2011-04-15 10:23:46 +03:00
|
|
|
stead.sound_load = sound_load
|
|
|
|
stead.sound_free = sound_free
|
|
|
|
stead.sounds_free = sounds_free
|
|
|
|
stead.sound_channel = sound_channel
|
2011-04-15 11:12:06 +03:00
|
|
|
stead.sound_volume = sound_volume
|
|
|
|
stead.sound_panning = sound_panning
|
|
|
|
|
2011-04-15 10:23:46 +03:00
|
|
|
sound = {
|
|
|
|
nam = 'sound';
|
|
|
|
object_type = true;
|
|
|
|
system_type = true;
|
|
|
|
load = function(fname)
|
|
|
|
return stead.sound_load(fname);
|
|
|
|
end;
|
|
|
|
free = function(key)
|
|
|
|
return stead.sound_free(key);
|
|
|
|
end;
|
|
|
|
play = function(key, ...)
|
|
|
|
return stead.add_sound(key, ...)
|
|
|
|
end;
|
|
|
|
stop = function(...)
|
|
|
|
stead.stop_sound(...);
|
|
|
|
end;
|
2011-04-15 11:12:06 +03:00
|
|
|
playing = function(s,...)
|
|
|
|
if type(s) ~= 'number' then
|
|
|
|
return stead.is_sound()
|
|
|
|
end
|
|
|
|
return stead.sound_channel(s,...)
|
|
|
|
end;
|
2011-04-23 10:26:19 +03:00
|
|
|
pan = function(c, l, r, ...)
|
|
|
|
return stead.sound_panning(c, l, r, ...)
|
2011-04-15 11:12:06 +03:00
|
|
|
end;
|
2011-04-15 12:58:17 +03:00
|
|
|
vol = function(v, ...)
|
|
|
|
return stead.sound_volume(v, ...)
|
2011-04-15 10:23:46 +03:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
|
|
|
stead.module_init(function()
|
|
|
|
stead.sounds_free();
|
|
|
|
end)
|