|
Forum Index : Microcontroller and PC projects : PicoMite wav playback problem with skipping audio
| Author | Message | ||||
| Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 719 |
Hey all! I ran into some problems with audio wav playback... I am using the latest version (not VGA) (> PRINT mm.ver 5.0703) First problem: Playing Wav files does not work properly, it "cuts" a second or so after start playing a file. So in detail: let's say the wav file is 4 seconds long, it begins normal for some milliseconds, then skips a second (circa) and then resumes at second number two, just to play the whole file perfectly. So I have no problems with long wav files, it will play long files, but it ALWAYS skips circa one second after it beginns to play for some milliseconds. My audiofile says in a humanoid voice: "Possible bio reading!", but all it outputs is: "possib. bio reading!" The playback quality is good with lowpass filter and OPTION audio PWM. I tried the following commands right in the prompt: play wav "filename", but also with a short program with a pause. Same problem. The normal sine wave tone works correctly, but playing wav files does not. I do not have any problems reading or writing to the sd-card. I tried different wave files with different durations, always the same behavior. Second problem: Problem when setting up OPTION AUDIO Pins, when I try to change them to other pins I get an error. Do I really have to OPTION RESET (all of them!) just to change one option? Because if so, I have to configure all options ... again. Greetings Daniel Edited 2022-02-01 09:04 by Amnesie |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2832 |
"Second problem: Problem when setting up OPTION AUDIO Pin" Use: OPTION AUDIO disable Before trying new settings. The manual doesn't spell this out for audio but for most options 'disable' or 'off' will work, without having to do the lot. |
||||
| cosmic frog Guru Joined: 09/02/2012 Location: United KingdomPosts: 302 |
I haven't tried the audio on the PicoMite myself but could this be a SDcard problem? Have you tried a different SDcard? Dave. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8298 |
It could, Dave. SD cards can make pretty heavy demands on the power supply sometimes. @Daniel Are you using Peter's 2R2 resistor and 100uF capacitor filter on the power supply to the SD card? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 719 |
Hello, I tried the schematic from the VGA version which has the filter (10uF up to 100uF) with the 2R2 resistor in the power supply of the 3V3 rail of the SD card. It doesn't work either. So I connected my Adafruit microSD breakout board, which is 5V ready, with 5V supply (it has a level shifter on board) but having the same "audio skipping" problem. My supply voltage is @ stable 5,01V, checked it already. I tried different sd cards and even different microSd breakout boards. The point is: writing and reading from sd card does work without any problems, but audio playback with a wav file does not. The "play tone" does work, too. My suspect is that it really has to do with the firmware, since everything else with sdcard works. - Supply voltage: check - tried different sd breakout boards with 3v3 and 5v supply: check - 2R2 + reservoir capacitor from 10uF to 100uF: check - writing / reading from / to sd: check - tried different wav files: check - tried different sdcards from different manufactures: check Do you have any further suggestions? Greetings Daniel |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8298 |
Thanks for the info. I assume you tried starting the play command then immediately following it by a pause that's longer than the playing time of the file? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10619 |
Please post your wav file. A skip at the beginning of most files wouldn't be noticeable. It could be a flash memory delay as the audio code is too big to hold in memory and wouldn't be in the flash cache |
||||
| Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 719 |
Yes, I tried it in the prompt with just PLAY wav "audifile" and of course even with a little program like: PLAY wav "audifile" PAUSE (sufficent pause time) But with no difference. Alsways the same audio skipping right after some milliseconds. I even tried it with wav files up to 5 minutes, same behavior; at the beginning audio skpping and then it plays the whole 5 minute file without any problems or skippings. Since every other sdcard operation works without a problem, I could imagine it is some kind of buffering issue. Does that make any sense? Greetings Daniel |
||||
| Amnesie Guru Joined: 30/06/2020 Location: GermanyPosts: 719 |
bio.zip This is the wave file, which says "warning biohazard detected" but it plays only: "warn.. biohazard detected" |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |