MCPcopy Create free account
hub / github.com/TASEmulators/fceux / InitSound

Function InitSound

src/drivers/win/sound.cpp:343–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341
342
343int InitSound() {
344 bits = 8;
345
346 if(!(soundoptions&SO_FORCE8BIT))
347 {
348 //no modern system should have this problem, and we dont use primary buffer
349 /*if( (!(dscaps.dwFlags&DSCAPS_PRIMARY16BIT) && !(soundoptions&SO_SECONDARY)) ||
350 (!(dscaps.dwFlags&DSCAPS_SECONDARY16BIT) && (soundoptions&SO_SECONDARY)))
351 FCEUD_PrintError("DirectSound: 16-bit sound is not supported. Forcing 8-bit sound.");*/
352
353 //if(dscaps.dwFlags&DSCAPS_SECONDARY16BIT)
354 bits = 16;
355 //else
356 // FCEUD_PrintError("DirectSound: 16-bit sound is not supported. Forcing 8-bit sound.")
357 }
358
359 win_SoundInit(bits);
360 if(killsound)
361 TrashSound();
362
363 FCEUI_Sound(soundrate);
364 return 1;
365}
366
367
368void win_SoundSetScale(int scale) {

Callers 4

FCEUD_TurboOffFunction · 0.70
FCEUD_TurboToggleFunction · 0.70
SoundConCallBFunction · 0.70
DriverInitializeFunction · 0.70

Calls 3

win_SoundInitFunction · 0.85
TrashSoundFunction · 0.85
FCEUI_SoundFunction · 0.85

Tested by

no test coverage detected