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

Method devicePrepare

Source/PC/Sound_PC2.cpp:165–181  ·  view source on GitHub ↗

Prepare the local audio device

Source from the content-addressed store, hash-verified

163
164// Prepare the local audio device
165bool cSound_PC2::devicePrepare() {
166
167 int audio_rate = 22050;
168 Uint16 audio_format = AUDIO_U8;
169 int audio_channels = 2;
170 int audio_buffers = 1024;
171
172 if(Mix_OpenAudio(audio_rate, audio_format, audio_channels, audio_buffers) != 0) {
173 mSound = false;
174 }
175 else {
176 mSound = true;
177 Mix_ChannelFinished( Mixer_ChannelFinished2 );
178 }
179
180 return true;
181}
182
183void cSound_PC2::MixerChannelFinished( int32 pChannel ) {
184

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected