Go to the documentation of this file.
3 #define MINIAUDIO_IMPLEMENTATION
4 #include "../miniaudio.h"
6 #define DR_WAV_IMPLEMENTATION
7 #include "../extras/dr_wav.h"
31 printf(
"No input file.\n");
42 printf(
"Failed to initialize output file.\n");
55 printf(
"Failed to initialize capture device.\n");
62 printf(
"Failed to start device.\n");
66 printf(
"Press Enter to stop recording...\n");
void ma_device_uninit(ma_device *pDevice)
ma_result ma_device_start(ma_device *pDevice)
int main(int argc, char **argv)
ma_device_callback_proc dataCallback
struct ma_device_config::@98 capture
DRWAV_API drwav_result drwav_uninit(drwav *pWav)
DRWAV_API drwav_bool32 drwav_init_file_write(drwav *pWav, const char *filename, const drwav_data_format *pFormat, const drwav_allocation_callbacks *pAllocationCallbacks)
ma_device_config ma_device_config_init(ma_device_type deviceType)
ma_result ma_device_init(ma_context *pContext, const ma_device_config *pConfig, ma_device *pDevice)
#define DR_WAVE_FORMAT_IEEE_FLOAT
DRWAV_API drwav_uint64 drwav_write_pcm_frames(drwav *pWav, drwav_uint64 framesToWrite, const void *pData)
void data_callback(ma_device *pDevice, void *pOutput, const void *pInput, ma_uint32 frameCount)