Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:51 20 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2 Not Playing Audio Files

Author Message
JohnD
Newbie

Joined: 23/08/2020
Location: New Zealand
Posts: 6
Posted: 03:33am 23 Sep 2020
Copy link to clipboard 
Print this post

 
JohnD
Newbie

Joined: 23/08/2020
Location: New Zealand
Posts: 6
Posted: 04:03am 23 Sep 2020
Copy link to clipboard 
Print this post

I guess that I'll get better at this!
I have a colour maximite 2 running MMBasic Ver 5.05.05. I have a manual for MMBasic Ver 5.05.04. I'm following this manual. In the direct mode the following command strings work:
Play tone 100,200,200
Play wav "basin street blues"
Play wav "" to play all wav files on the SD card
Play modfile "T1"
I have a separately powered desktop stereo speaker system that works well when the commands are made in the direct mode but there is no sound when the commands are made through a single line Basic programme.  
When I write a single line basic programme for each of these, the screen shows run a blank line and then the > cursor on the next line.
If I try to play a file with a name that does not exist, the CMM2 reports "Error in line 1: Could not find the file.
What am I doing wrong?
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5886
Posted: 04:12am 23 Sep 2020
Copy link to clipboard 
Print this post

Perhaps your program is ending before it has time to play the sounds.
Try

DO:LOOP until inkey$ <> ""
before the end
VK7JH
MMedit   MMBasic Help
 
JohnD
Newbie

Joined: 23/08/2020
Location: New Zealand
Posts: 6
Posted: 08:36am 23 Sep 2020
Copy link to clipboard 
Print this post

That Fixed it. I didn't think of that. I expected it to work as if was called in the immediate mode. I'll have to write longer programmes. Many thanks.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024