nukeykt / Nuked-SC55

Roland SC-55 series emulation
Other
285 stars 33 forks source link

Add CLI switch for audio buffer size and number #40

Closed pachuco closed 2 months ago

pachuco commented 2 months ago

Format is -ab:PAGESIZE:NUMPAGES Default is values 512:32.

I typically pass -ab:4096:2 to get emu running nicely on my end.

pachuco commented 2 months ago

I could have put it all in -a: instead, like -a:DEVICE:PAGESIZE:NUMPAGES, but it felt bad to force passing an audio device just to pass buffer size. Unless device 0 is the OS default?

Falcosoft commented 2 months ago

Device 0 is NOT the OS default device. Device 0 is always the 1st device so if you change the default device e.g. on Win Vista+ sound control panel it does not reflect the change. You have to pass explicit NULL to SDL_OpenAudioDevice() as first parameter to use OS default device (and so in order the emulator to 'follow' the device selected in the sound control panel).

pachuco commented 2 months ago

Hmmm, another way I could see this done is passing -a:x:4096:2, where x tells to use default value(-1 for audio dev). Or maybe -a:d1:b4096:n2. Oh god, that looks abominable...

Nah, sod it. Simple as it already is.

pachuco commented 2 months ago

Oh, oh, better idea, ipv6 style! -a::4096:2 ommit audio device -a:3:4096:2 all options -a:3::24 ommit buffer size -a:3 just the device

Eh, still kinda ugly.