mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Tabs to spaces.
This commit is contained in:
+13
-11
@@ -53,15 +53,17 @@ int main()
|
||||
return -1;
|
||||
}
|
||||
|
||||
mal_device_config config;
|
||||
config.format = mal_format_s16;
|
||||
config.channels = 2;
|
||||
config.sampleRate = 48000;
|
||||
config.bufferSizeInFrames = 0; // Use default.
|
||||
config.periods = 0; // Use default.
|
||||
config.onRecvCallback = on_recv_frames;
|
||||
config.onSendCallback = on_send_frames;
|
||||
config.onStopCallback = NULL;
|
||||
mal_device_config config;
|
||||
config.format = mal_format_s16;
|
||||
config.channels = 2;
|
||||
config.sampleRate = 48000;
|
||||
config.channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
|
||||
config.channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
|
||||
config.bufferSizeInFrames = 0; // Use default.
|
||||
config.periods = 0; // Use default.
|
||||
config.onRecvCallback = on_recv_frames;
|
||||
config.onSendCallback = on_send_frames;
|
||||
config.onStopCallback = NULL;
|
||||
config.onLogCallback = NULL;
|
||||
|
||||
printf("Recording...\n");
|
||||
@@ -89,9 +91,9 @@ int main()
|
||||
mal_device_start(&playbackDevice);
|
||||
|
||||
printf("Press Enter to quit...\n");
|
||||
getchar();
|
||||
getchar();
|
||||
mal_device_uninit(&playbackDevice);
|
||||
|
||||
mal_context_uninit(&context);
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
@@ -37,15 +37,17 @@ 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_s16;
|
||||
config.channels = wav.channels;
|
||||
config.sampleRate = wav.sampleRate;
|
||||
config.bufferSizeInFrames = 0; // Use default.
|
||||
config.periods = 0; // Use default.
|
||||
config.onRecvCallback = NULL; // Not used for playback.
|
||||
config.onSendCallback = on_send_frames_to_device;
|
||||
config.onStopCallback = NULL;
|
||||
mal_device_config config;
|
||||
config.format = mal_format_s16;
|
||||
config.channels = wav.channels;
|
||||
config.sampleRate = wav.sampleRate;
|
||||
config.channelMap[0] = MAL_CHANNEL_FRONT_LEFT;
|
||||
config.channelMap[1] = MAL_CHANNEL_FRONT_RIGHT;
|
||||
config.bufferSizeInFrames = 0; // Use default.
|
||||
config.periods = 0; // Use default.
|
||||
config.onRecvCallback = NULL; // Not used for playback.
|
||||
config.onSendCallback = on_send_frames_to_device;
|
||||
config.onStopCallback = NULL;
|
||||
config.onLogCallback = NULL;
|
||||
|
||||
mal_device device;
|
||||
|
||||
Reference in New Issue
Block a user