Hi,
I'm working on an T4.1 ethernet based intercom system and in order to do sample rate synchronization, i need to know how many audiobuffers are in use for a specific queue. Depending on the number of buffers in use, i can decide to increase or decreae the sample rate slightly, to prevent buffer under- or overruns.
I manually added a function in the play-queue .cpp and .h files, but i would prefer if this can be added to the standard distribution / updates.
Alternatively, i would like to know if i can access the relevant parameters outside the library to achieve the same goal.
These are my modifications:
Added in play_queue.h: (public: section)
Added functionality in play_queue.cpp:
Thanks for your feedback
(repost since i got no reaction on post in Technical Support & Questions section)
I'm working on an T4.1 ethernet based intercom system and in order to do sample rate synchronization, i need to know how many audiobuffers are in use for a specific queue. Depending on the number of buffers in use, i can decide to increase or decreae the sample rate slightly, to prevent buffer under- or overruns.
I manually added a function in the play-queue .cpp and .h files, but i would prefer if this can be added to the standard distribution / updates.
Alternatively, i would like to know if i can access the relevant parameters outside the library to achieve the same goal.
These are my modifications:
Added in play_queue.h: (public: section)
C++:
int buffersInUse(void); //BH
Added functionality in play_queue.cpp:
C++:
int AudioPlayQueue::buffersInUse(void) //BH
{
int8_t r=0;
uint8_t h = head;
uint8_t t = tail;
if (h==head && t==tail)
{
r=h-t;
if(r<0) r=r+max_buffers;
}
return r;
}
Thanks for your feedback
(repost since i got no reaction on post in Technical Support & Questions section)