Hi. For long wave use _SNDPLAY. Its better to use this command. Its possible in the same time using _SNDPLAYFILE - but not for long files. I tried to play WAV files with a length of 66 minutes without any problems at a time. The problem is the solution. WAV whole is introduced into ram and then the application needed over one giga memory. I confirm that:
- _SNDBAL Not working as it should even with all types of WAV files even when using DOUBLE values (but with other type too not),
- MP3 play all NOT correctly, at low bitrate playback finishes prematurely - but only sometimes and I could not figure why.
This commands _SND... never making errors. All about this is in help (Shift + F1).
- SNDVOL is ok, no problem. I use W7, QB64 1.1. Here is my first source code for sound play:
DO WHILE x < 5
IF _SNDPLAYING(oldzvuk&) = 0 THEN
x = x + 1
'LOCATE 8, 1: PRINT x, stav
DATA brzdy.mp3,odraz.mp3,srazka.mp3,t1.mp3,m16.mp3 'here insert your MP3s or OGGs.... - 5 files
SUB hraj (plaj AS STRING)
IF _SNDPLAYING(oldzvuk&) = -1 THEN PRINT "Sorry, now playing": EXIT SUB
IF _SNDPLAYING(oldzvuk&) = 0 THEN _SNDCLOSE oldzvuk&: zvuk& = _SNDOPEN(plaj$, "VOL"): oldzvuk& = zvuk&
IF zvuk& > 0 THEN PRINT "File ready" ELSE PRINT "File not ready - "; plaj$