Go to the documentation of this file.
13 #define MINIAUDIO_IMPLEMENTATION
14 #include "../miniaudio.h"
21 if (pDecoder ==
NULL) {
38 printf(
"No input file.\n");
44 printf(
"Could not load file: %s\n",
argv[1]);
56 printf(
"Failed to open playback device.\n");
62 printf(
"Failed to start playback device.\n");
68 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
void data_callback(ma_device *pDevice, void *pOutput, const void *pInput, ma_uint32 frameCount)
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)
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)
int main(int argc, char **argv)
struct ma_device_config::@97 playback
ma_uint32 outputSampleRate