Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Prev Previous Post   Next Post Next
Old 10-26-2020, 05:39 AM   #1
Human being with feelings
SaschArt's Avatar
Join Date: Aug 2013
Posts: 225
Default Audio sampler and right buffering

I want to make a sampler. How do I send the packages correctly to ProcessDoubleReplacing ?
I tried to read from the audio file packets by 896k. The problem is that during the period when the audio sample buffer is read, time passes, this delays ProcessDoubleReplacing output and gaps appear when playing audio.

It is possible to send only a part of samples and send a message to the host that only a part of the sampleblock was sent? Does SetLatency (partial_samplesblock) do that? Something like
for (int s=0; s < samplesblock; ++s) {
	if (pos_counter>=buf_start+buf_size) {			
	// process samples from buffer here 
Unfortunately the above code still introduce gaps on the audio output.
Audio plugins | BrainWaveProducer | EmRysRa

Last edited by SaschArt; 10-26-2020 at 09:52 AM.
SaschArt is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 08:21 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.