Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
irrKlang 2D PlayPosition only updates about 20 times per second, not every time it's called

jupisoft
Registered User
Quote
2016-06-15 05:44:49

Hello recently I have been using your excellent library but I've been doing some testing with it and found that even when I call the property PlayPosition when playing a 2D sound within a Winfom in C with a Timer set to 1 Millisecond (that actually runs at 64 times per second, about each 15 milliseconds), and every tick I've tried to read the PlayPosition, about 3 of four times it gave me the same playback position that before. So if I'm playing a WAV song with 16 bits stereo at 44.100 Hz, and drawing on screen the samples of the song as waveform in sync with the PlayPosition, so it ends drawing 64 times a second, but only updating the wave about 20 per second, thus wasting processor time. My goal will be that whenever I call the PlayPosition property, it updates itself, obtaining it in real time if possible, at least with WAV files, that has constant and predictable bitrate and play position, so I can draw the waveform more fast and smoothly (since it only updates 20 times per second, I draw on my screen of 1.024 x 768, at that rate I should draw 2.205 samples, but per tick I can only draw 1.024, so if it updated faster that property I could draw up to 43,06 times per second, and faster on higher frequencies, and not be loosing half the samples every time). I might help doing that code in C if it was necessary, or send the code I've created so far to help solve that issue, that maybe it's not a real bug for most people, but for my current needs it is. All it's other features so far worked perfectly, so I'm very happy with it. Thank you very much for your attention.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact