Announcement

Collapse
No announcement yet.

No Audio from WAV file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • No Audio from WAV file

    Trying to add a WAV playback on my Form1. WAV file is a valid, 108Kb file (play in windows media player with no issues). I added a sound object to my Form0, code compiled and uploaded with no issues. Files all copied to SD card with no issues. When running my Arduino sketch, no audio is generated expect for a very faint 'click' (this is the forst time I'm trying audio with this LCD panel - uLCD-43PT). Code used to run the audio is as follows:

    genieBegin(GENIE_SERIAL, 19200); // LCD Display Setup & event handler
    pinMode(4, OUTPUT); // Set D4 on Arduino to Output
    digitalWrite(4, 1); // Reset the Display via D4
    delay(100);
    digitalWrite(4, 0); // unReset the Display via D4
    delay (3500); // let the display start up
    genieWriteContrast(15); // COntrast Level, 0 (off) - 15 (brightest)

    genieWriteObject(GENIE_OBJ_FORM, 0x00, 0);
    genieWriteObject(GENIE_OBJ_SOUND, 0x00, 0); // File 0 (first and only)
    genieWriteObject(GENIE_OBJ_SOUND, 0x01, 100); // set volume
    for(i = 100; i > 1; i--){ // Fade out
    genieWriteObject(GENIE_OBJ_SOUND, 0x01, i);
    delay(100);
    }
    genieWriteObject(GENIE_OBJ_SOUND, 0x04,0); // Stop Sound formally

    genieWriteObject(GENIE_OBJ_FORM, 0x01, 0); // Move to Form 1


    Is it possible that the WAV file never made it into the compile ?

    -Pete

  • #2


    See if you can see the file on the uSD card.

    Can you use zip project and post the project here?

    When you added it in Workshop did it indicate the wav file was valid?
    Mark

    Comment

    Working...
    X