Go Down

Topic: Looking to play an MP3 file during the start of my program. (Read 425 times) previous topic - next topic

jubulex

Hello,

I am looking for some assistance on trying to get an MP3 file to play during the start of my program. I would just like the sound to come from my computer. It really doesn't have anything to do with the arduino directly. I'm using the arduino to control Neopixle lights.

Here is what i tried with no success for playing an MP3 file on the start of my program.


Code: [Select]
#include <stdio.h>
#include <stdlib.h>

int main()
{
   FILE * fp;

   fp = fopen ("file.mp3", "r");
 
   
   fclose(fp);
   
   return(0);
}


I understand that "r" is probably the wrong thing to use because it just reads a file. I tried looking around this forum with but couldn't find anything relating to my issue.

Thanks for the help!

Grumpy_Mike

Quote
understand that "r" is probably the wrong thing to use because it just reads a file.
That is correct. This is an Arduino forum so there will be nothing about playing a MP3 file in a PC. You need to use a language that supports this. The one called Processing can play sound files, it is based on Java so it is a C syntax.

Go Up