I have written a small French-English Dictionary using VB.
I have come to a serious problem which is new to me. Maybe I didn't notice this problem before, but it's a bad bug in my program.
I record an audio file for a French word in my dictionary and another audio file for an English word in the same dictionary.
When the user picks a word from the listbox, if the selected item has an audio file, two icons appear: one for the French pronunciation and another for the English pronunciation.
Up to now, everything seems to be OK. I use "msdxm.ocx" to embed Media Player into my application. It's fast and easy. I like it. Sometimes I use "wmp.dll" to embed Windows Media Player in my projects. But I like the first one better.
The problem is that when you press the Play/Pronounce Button many times before the current audio file ends, the audio file starts not from the very beginning. It seems that about 1 or 2 seconds of the start of the audio file is lost and not played.
I guess that it might be related to "BufferingT ime" which is a ReadOnly Property for MediaPlayer and by default, it's equal to 5.
Imagine that we have an audio file. If we add a Media Player object in our project, and a Button calls that Media Player with that audio file, you can easily play audio materials. But, if you press that Button many times, sometimes it isn't played from the very beginning.
This is such a bad bug especially for very short audio files. In my case, I have a very short audio file that pronounces just one word. Sometimes it's about 1 second long or even shorter.
How can I solve this problem?
Thank you very much.
I have come to a serious problem which is new to me. Maybe I didn't notice this problem before, but it's a bad bug in my program.
I record an audio file for a French word in my dictionary and another audio file for an English word in the same dictionary.
When the user picks a word from the listbox, if the selected item has an audio file, two icons appear: one for the French pronunciation and another for the English pronunciation.
Up to now, everything seems to be OK. I use "msdxm.ocx" to embed Media Player into my application. It's fast and easy. I like it. Sometimes I use "wmp.dll" to embed Windows Media Player in my projects. But I like the first one better.
The problem is that when you press the Play/Pronounce Button many times before the current audio file ends, the audio file starts not from the very beginning. It seems that about 1 or 2 seconds of the start of the audio file is lost and not played.
I guess that it might be related to "BufferingT ime" which is a ReadOnly Property for MediaPlayer and by default, it's equal to 5.
Imagine that we have an audio file. If we add a Media Player object in our project, and a Button calls that Media Player with that audio file, you can easily play audio materials. But, if you press that Button many times, sometimes it isn't played from the very beginning.
This is such a bad bug especially for very short audio files. In my case, I have a very short audio file that pronounces just one word. Sometimes it's about 1 second long or even shorter.
How can I solve this problem?
Thank you very much.
Comment