diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-01-31 21:32:19 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-01-31 21:32:19 +0300 |
commit | 6c584a449a33f090fc490a427d2c5eed0c41264a (patch) | |
tree | 32a9556d2656dcdd09e7477402accaaa2175f12f /source/blender/blenkernel/intern/sound.c | |
parent | 04991f0ab75d95c85e8c9eeeea81d849058c999d (diff) |
-setaudio argument to force an audio device.
This also means that only -s and -S are accepted to set start frame and scene (before, it would accept anything that started with s or S, you could have done blender -b file.blend -super 1 -Science "scene 2").
We really need better argument parsing...
Diffstat (limited to 'source/blender/blenkernel/intern/sound.c')
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 948791aa5d8..1be59529cc7 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -33,6 +33,20 @@ static int force_device = -1; +int sound_define_from_str(char *str) +{ + if (BLI_strcaseeq(str, "NULL")) + return AUD_NULL_DEVICE; + if (BLI_strcaseeq(str, "SDL")) + return AUD_SDL_DEVICE; + if (BLI_strcaseeq(str, "OPENAL")) + return AUD_OPENAL_DEVICE; + if (BLI_strcaseeq(str, "JACK")) + return AUD_JACK_DEVICE; + + return -1; +} + void sound_force_device(int device) { force_device = device; |