Update examples.

This commit is contained in:
David Reid
2016-12-29 20:43:31 +10:00
parent 47cc931933
commit 3348fc0a3c
3 changed files with 277 additions and 138 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ mal_uint32 on_send_frames_to_device(mal_device* pDevice, mal_uint32 frameCount,
return 0;
}
return (mal_uint32)drwav_read_f32(pWav, frameCount * pDevice->channels, (float*)pSamples) / pDevice->channels;
return (mal_uint32)drwav_read_s16(pWav, frameCount * pDevice->channels, (mal_int16*)pSamples) / pDevice->channels;
}
int main(int argc, char** argv)
@@ -38,7 +38,7 @@ int main(int argc, char** argv)
// In this example we use the default playback device with a default buffer size and period count.
mal_device_config config;
config.format = mal_format_f32;
config.format = mal_format_s16;
config.channels = wav.channels;
config.sampleRate = wav.sampleRate;
config.bufferSizeInFrames = 0; // Use default.