PlaySound and the BX-35

Started by cowenowner September 30, 2004
I have not had much success with PlaySound on my BX-35.

I have written a small basicx program to play a sound stored in the
eeprom from bytes 20000 to 30000...

Option Explicit

Public Sub Main()
Call FreqOut(40,4000,4000,1.0)
delay 0.5
Call PlaySound(40,20000, 10000,5000,10)
Call FreqOut(40,2000,2000,1.0)

'Call playSound(40,400,10300,2000,0)
'
End Sub

I inserted the sound values by appending binary data to the .bxb file.

When I run the program, the BX-35 just resets after the first tone and
delay, so what you get is a tone every .5 seconds. If it worked, I
should get 20 secods of music (5000 sample rate, 10000 samples, 10
repeats = 20 seconds). I just don't understand why this does not
work.

To check things, I downloaded the SoundFile demo project entitled
"Using BasicX Block Data Objects with PlaySound" from BasicX.com. The
BX also reset upon reaching the PlaySound command in this demo
(everything up to the playsound command worked fine). My first guess
is that there is a problem with the BX-35 and playsound. Perhaps with
the external EEPROM??

Does anyone have any other theories or experience?

Thanks,

Stephen




Replying to my own message...

I have since tried the same code on a BX-24 and it worked just fine. I
have tested with another BX-35 and it also failed. The conclusion is
that something is up with PlaySound and the BX-35 and/or the BX-35
development station. No word yet from Netmedia on this though.

Stephen
--- In , "cowenowner" <cowenowner@y...> wrote:
> I have not had much success with PlaySound on my BX-35.
>
> I have written a small basicx program to play a sound stored in the
> eeprom from bytes 20000 to 30000...
>
> Option Explicit
>
> Public Sub Main()
> Call FreqOut(40,4000,4000,1.0)
> delay 0.5
> Call PlaySound(40,20000, 10000,5000,10)
> Call FreqOut(40,2000,2000,1.0)
>
> 'Call playSound(40,400,10300,2000,0)
> '
> End Sub
>
> I inserted the sound values by appending binary data to the .bxb file.
>
> When I run the program, the BX-35 just resets after the first tone and
> delay, so what you get is a tone every .5 seconds. If it worked, I
> should get 20 secods of music (5000 sample rate, 10000 samples, 10
> repeats = 20 seconds). I just don't understand why this does not
> work.
>
> To check things, I downloaded the SoundFile demo project entitled
> "Using BasicX Block Data Objects with PlaySound" from BasicX.com. The
> BX also reset upon reaching the PlaySound command in this demo
> (everything up to the playsound command worked fine). My first guess
> is that there is a problem with the BX-35 and playsound. Perhaps with
> the external EEPROM??
>
> Does anyone have any other theories or experience?
>
> Thanks,
>
> Stephen