mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 08:44:04 +02:00
Add ma_audio_buffer_ref.
This is a data source whose backing data is an application-controlled pointer. No data is copied. It's a way of efficiently wrapping a raw buffer and using it as a data source.
This commit is contained in:
@@ -5531,7 +5531,7 @@ static ma_result ma_resource_manager_data_buffer_init_connector(ma_resource_mana
|
||||
config = ma_audio_buffer_config_init(pDataBuffer->pNode->data.decoded.format, pDataBuffer->pNode->data.decoded.channels, pDataBuffer->pNode->data.decoded.frameCount, pDataBuffer->pNode->data.encoded.pData, NULL);
|
||||
result = ma_audio_buffer_init(&config, &pDataBuffer->connector.buffer);
|
||||
|
||||
pDataBuffer->lengthInPCMFrames = pDataBuffer->connector.buffer.sizeInFrames;
|
||||
pDataBuffer->lengthInPCMFrames = pDataBuffer->connector.buffer.ref.sizeInFrames;
|
||||
} else {
|
||||
ma_decoder_config configOut;
|
||||
configOut = ma_decoder_config_init(pDataBuffer->pResourceManager->config.decodedFormat, pDataBuffer->pResourceManager->config.decodedChannels, pDataBuffer->pResourceManager->config.decodedSampleRate);
|
||||
|
||||
Reference in New Issue
Block a user