Playing WAV files

HomeForumsMonoBrick EV3 FirmwarePlaying WAV files

This topic contains 5 replies, has 2 voices, and was last updated by Author Image Anders Søborg 3 years, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3989
    Author Image
    Dirk Stichling
    Participant

    Hi.

    I managed to compile and run an application that plays a sound:

    this.speaker = new Speaker (50);
    string soundFileName = “/home/root/apps/R2D2.wav”;
    this.speaker.PlaySoundFile (soundFileName);

    However, when I run the application I only hear a very short crazy sound but not really my WAV file.

    Do I need to convert it to a special format?

    Dirk

    #3990
    Author Image
    Dirk Stichling
    Participant

    Hi.

    I also tried to execute speaker.Beep and that doesn’t work either.

    BTW: I am using the firmware version that is currently available in the GIT repository.

    Dirk

    #3998
    Author Image
    Anders Søborg
    Key Master

    Hi

    When you are using the “master” branch of the GIT repository you are using the “latest and greatest”. The master branch is used for development and some upcoming features are working and some are not. If you want to use the brach that was used for the latest release then switch to the release branch – this should be stable but will be missing some features.

    However I have tested that beep and tones should work while wav playback does not. Are you trying to play more that one tone at a time?

    Anders

    #4003
    Author Image
    Dirk Stichling
    Participant

    Hi.

    I am mainly interested in playing WAV files. But I understand that it is not yet implemented. I also tried to just call speaker.Beep or speaker.Buzz but that didn’t work either.

    Dirk

    #4005
    Author Image
    Anders Søborg
    Key Master

    Hi

    You could try and fix the problem and then make a pull request :-)

    Anders

    #4013
    Author Image
    Anders Søborg
    Key Master

    Hi Dirk

    Maybe try to post that code that is failing and I will have a look at it…

    Anders

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Posted in

Make a donation