Wav playing help, please
Erlend
Posts: 612
A year ago I played wav from SD with no problems. Now, with a new setup I've spent hours and hours to try to get sound, and I really need help - again.
I've tried:
WavePlayerSDaccess (David Sloan)
SDwavPlay (Raymond Allen) (this was the one I used a year ago)
WAV-Player_DACEngine.spin (Kwabena)
-and SD_Card_Micro_01.spin (Greg Denson) for writing text to file
The set-up is on a Prof Dev board, and I am using the on-board audio amp
Troubleshooting done:
-put LEDs on the SD pins - yes there is modem-like activity for Kwabena's, with the other objects the LEDs are half-lit, except LED pinDO which is off
-put LEDs on the audio pins - no light
-written a text string to the SD - works fine
-tested o/p by connecting audio pins directly to aux in on my amplifier - no sound
-measured ac on the audio pins - there's ~1.6V dc, and no ac (using a multimeter)
-connected the speakers to my pod - sound is ok.
-run a simple 1000hz out spin code - speakers beep
Pins used:
PinSDdo = 14 - the 'base pin'
PinSDclk = 15
PinSDdi = 16
PinSDcs = 17
PinAUDIOr = 25 (changed to 8)
PinAUDIOl = 26 (changed to 9 )
The SD is a 2GB microSD from Scandisk and sits in the simple SDcard adaptor from Parallax
The wav file is a 16bit 44khz stereo file, which plays at approx 1400kb/s. Size approx 30MB. It plays fine on my pc.
I am concluding that communication with the SD works fine - to write a text, and that the Kwabena wav player keeps talking to the SD. Other than that I am at complete loss as what to do next.
Maybe someone could give me a tested demo&objects set of code, with the above pin assignment and the file called "wav.wav" - there must be something stupid I am doing.
Erlend
I've tried:
WavePlayerSDaccess (David Sloan)
SDwavPlay (Raymond Allen) (this was the one I used a year ago)
WAV-Player_DACEngine.spin (Kwabena)
-and SD_Card_Micro_01.spin (Greg Denson) for writing text to file
The set-up is on a Prof Dev board, and I am using the on-board audio amp
Troubleshooting done:
-put LEDs on the SD pins - yes there is modem-like activity for Kwabena's, with the other objects the LEDs are half-lit, except LED pinDO which is off
-put LEDs on the audio pins - no light
-written a text string to the SD - works fine
-tested o/p by connecting audio pins directly to aux in on my amplifier - no sound
-measured ac on the audio pins - there's ~1.6V dc, and no ac (using a multimeter)
-connected the speakers to my pod - sound is ok.
-run a simple 1000hz out spin code - speakers beep
Pins used:
PinSDdo = 14 - the 'base pin'
PinSDclk = 15
PinSDdi = 16
PinSDcs = 17
PinAUDIOr = 25 (changed to 8)
PinAUDIOl = 26 (changed to 9 )
The SD is a 2GB microSD from Scandisk and sits in the simple SDcard adaptor from Parallax
The wav file is a 16bit 44khz stereo file, which plays at approx 1400kb/s. Size approx 30MB. It plays fine on my pc.
I am concluding that communication with the SD works fine - to write a text, and that the Kwabena wav player keeps talking to the SD. Other than that I am at complete loss as what to do next.
Maybe someone could give me a tested demo&objects set of code, with the above pin assignment and the file called "wav.wav" - there must be something stupid I am doing.
Erlend
Comments
It works, but I do not like magic in software. Btw, it is the Kwabena player that is running now.
Erlend
When I look at my old wav player now, I can see that it needs some improvements. Particularly in how you set the pins...
I'll try to find time to fix it up...
The PC has the horsepower to buffer the file and strip out this non-audio data, Propeller-based audio players do not. In my WAV object (used in the EFX-TEK AP-16+) the file will stop playing as soon as it hits a metadata chunk; if this chunk is at the very beginning of the file (just after the normal WAV header), the file will be there but will not play.