MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / devicePrepare

Method devicePrepare

Source/PC/Sound_PC.cpp:92–108  ·  view source on GitHub ↗

Prepare the local audio device

Source from the content-addressed store, hash-verified

90
91// Prepare the local audio device
92bool cSound_PC::devicePrepare() {
93
94 int audio_rate = 22050;
95 Uint16 audio_format = AUDIO_U8;
96 int audio_channels = 2;
97 int audio_buffers = 1024;
98
99 if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) != 0) {
100 mSound = false;
101 }
102 else {
103 mSound = true;
104 Mix_ChannelFinished( Mixer_ChannelFinished );
105 }
106
107 return true;
108}
109
110void cSound_PC::MixerChannelFinished( int32 pChannel ) {
111

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected