[AD] al_get_audio_stream_played_samples patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hello,

this is a follow up to the conversation that started here:
https://www.allegro.cc/forums/thread/613415

The thread is locked and Peter Wang suggested to continue the conversation here. 
To pick up the last open point:

To Peter Wang:
>> Markus Henschel said:
>> I tried to create a patch that will add al_get_audio_stream_played_samples 
>> as well as al_get_audio_stream_position.  The first works on all audio 
>> streams. The latter works only for self-updating streams. I tried to make 
>> al_get_audio_stream_position work as exactly as possible.
> Peter Wang said:
> I think it would be fine when the details are worked out, and the change 
> in behaviour is probably acceptable. On the other hand, is there any reason 
> to make this change if we want to deprecate self-updating streams, and 
> al_get_audio_stream_played_samples exists for your use case?

I think it isn't worth the trouble to add al_get_audio_stream_position for self-updating streams. While it would increase the accuracy of the playback position for those it is too much work for something that would still have its shortcomings. This is even more true if the current implementation of self-updating audio streams gets deprecated. I only submitted the patch because you suggested to check if the position getters for those streams could use al_get_audio_stream_played_samples somehow. But if we can agree on not doing that in the current implementation of self-updating streams I think that patch served its purpose.

So I attached a patch that only adds al_get_audio_stream_played_samples. It solves my use case perfectly. If you could submit that it would enable me to use an unpatched version of allegro again. :-)


Have a nice weekend

PS.: I tried to convince my Outlook to comply with the usual rules for mailing lists. If there is still something wrong please let me now. I hope attaching patches is OK.


Markus Henschel
Lead Programmer

Vegazz Entertainment GmbH
Pfuelstrasse 5
10997 Berlin
Germany

Sitz der Gesellschaft: Berlin | Geschäftsführer: Timo Ullmann, Philipp Schellbach
Amtsgericht Berlin-Charlottenburg | HRB 134246 B | USt-ID-Nr. DE 277355531

Attachment: 0001-add-al_get_audio_stream_played_samples.patch
Description: 0001-add-al_get_audio_stream_played_samples.patch



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/