removed user-specified sample rates for Decoders

This commit is contained in:
Bill Meltsner
2011-01-15 14:29:10 -06:00
parent 6e8a48bd01
commit 4479e8dfc4
14 changed files with 69 additions and 70 deletions
+8 -9
View File
@@ -84,11 +84,10 @@ namespace sound
love::filesystem::File * file = luax_checktype<love::filesystem::File>(L, 1, "File", FILESYSTEM_FILE_T);
int bufferSize = luaL_optint(L, 2, Decoder::DEFAULT_BUFFER_SIZE);
int sampleRate = luaL_optint(L, 3, Decoder::DEFAULT_SAMPLE_RATE);
try
{
Decoder * t = instance->newDecoder(file, bufferSize, sampleRate);
Decoder * t = instance->newDecoder(file, bufferSize);
if(t == 0)
return luaL_error(L, "Extension \"%s\" not supported.", file->getExtension().c_str());
luax_newtype(L, "Decoder", SOUND_DECODER_T, (void*)t);
@@ -131,13 +130,13 @@ namespace sound
instance->retain();
WrappedModule w;
w.module = instance;
w.name = "sound";
w.flags = MODULE_SOUND_T;
w.functions = functions;
w.types = types;
WrappedModule w;
w.module = instance;
w.name = "sound";
w.flags = MODULE_SOUND_T;
w.functions = functions;
w.types = types;
return luax_register_module(L, w);
}