mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
Reorder parameters in the callback.
This swaps the order of the input and output pointers so that it's consistent with the order used by memcpy().
This commit is contained in:
@@ -12,7 +12,7 @@ mal_uint32 capturedSampleCount = 0;
|
||||
mal_int16* pCapturedSamples = NULL;
|
||||
mal_uint32 playbackSample = 0;
|
||||
|
||||
void on_recv_frames(mal_device* pDevice, const void* pInput, void* pOutput, mal_uint32 frameCount)
|
||||
void on_recv_frames(mal_device* pDevice, void* pOutput, const void* pInput, mal_uint32 frameCount)
|
||||
{
|
||||
mal_uint32 sampleCount = frameCount * pDevice->channels;
|
||||
|
||||
@@ -30,7 +30,7 @@ void on_recv_frames(mal_device* pDevice, const void* pInput, void* pOutput, mal_
|
||||
(void)pOutput;
|
||||
}
|
||||
|
||||
void on_send_frames(mal_device* pDevice, const void* pInput, void* pOutput, mal_uint32 frameCount)
|
||||
void on_send_frames(mal_device* pDevice, void* pOutput, const void* pInput, mal_uint32 frameCount)
|
||||
{
|
||||
mal_uint32 samplesToRead = frameCount * pDevice->channels;
|
||||
if (samplesToRead > capturedSampleCount-playbackSample) {
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// This is the function that's used for sending more data to the device for playback.
|
||||
void on_send_frames_to_device(mal_device* pDevice, const void* pInput, void* pOutput, mal_uint32 frameCount)
|
||||
void on_send_frames_to_device(mal_device* pDevice, void* pOutput, const void* pInput, mal_uint32 frameCount)
|
||||
{
|
||||
mal_decoder* pDecoder = (mal_decoder*)pDevice->pUserData;
|
||||
if (pDecoder == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user