Go to the documentation of this file. 1 #define DR_FLAC_IMPLEMENTATION
2 #include "../extras/dr_flac.h"
3 #define DR_MP3_IMPLEMENTATION
4 #include "../extras/dr_mp3.h"
5 #define DR_WAV_IMPLEMENTATION
6 #include "../extras/dr_wav.h"
8 #define MINIAUDIO_IMPLEMENTATION
9 #include "../miniaudio.h"
16 if (pDecoder ==
NULL) {
33 printf(
"No input file.\n");
50 printf(
"Failed to open playback device.\n");
56 printf(
"Failed to start playback device.\n");
62 printf(
"Press Enter to quit...");
void ma_device_uninit(ma_device *pDevice)
ma_result ma_device_start(ma_device *pDevice)
ma_result ma_decoder_uninit(ma_decoder *pDecoder)
@ ma_device_type_playback
ma_device_callback_proc dataCallback
int main(int argc, char **argv)
ma_uint64 ma_decoder_read_pcm_frames(ma_decoder *pDecoder, void *pFramesOut, ma_uint64 frameCount)
ma_device_config ma_device_config_init(ma_device_type deviceType)
void data_callback(ma_device *pDevice, void *pOutput, const void *pInput, ma_uint32 frameCount)
ma_result ma_decoder_init_file(const char *pFilePath, const ma_decoder_config *pConfig, ma_decoder *pDecoder)
ma_result ma_device_init(ma_context *pContext, const ma_device_config *pConfig, ma_device *pDevice)
struct ma_device_config::@97 playback
ma_uint32 outputSampleRate