Active Forums => Programs => Topic started by: mynameispaul on September 13, 2020, 02:30:57 pm
Title: Audio Reverse (play audio file in reverse)
Post by: mynameispaul on September 13, 2020, 02:30:57 pm
' This program does not play backwards perfectly. Basically the program is ' still playing the audio file in the forwards direction using QB64 command ' _SNDPLAY, but the program constantly is using the _SNDSETPOS command to ' "back up" to a previous location in the audio playback. By playing only ' very small "blocks" of audio, working backwards, it makes it sound like ' the audio file is being played backwards. ' I recomend running the "Update Count Per Second" option on the main menu ' when you first run the program. (but you don't have to) This option will ' see how much the program can count in 1 second (10x). Hard to explain but ' helps the program work better. ' Play around with the other variables in its config file ' - SecondsPositionAdjust ' - DelayCounterAdjust ' Maybe you can come up with a better settings than what i used.
Title: Re: Audio Reverse (play audio file in reverse)
Post by: Petr on September 15, 2020, 03:06:13 am
Hello. To actually play an audio file from back to front, you must have RAW audio decoders. In WAV format, this is easiest to do if WAV does not contain ID3 information. The first 45 bytes in the file are the header. You leave the same here and turn over the rest of the audio data.
For reverse and play WAV files: (8 bit mono/stereo - BYTE swap, for 16 bit is need INTEGERs swap)