sound - running an mp3 with winamp

This is a discussion on sound - running an mp3 with winamp within the C++ Programming forums, part of the General Programming Boards category; Ok, what I'm trying to do is run a file with a separate executable outside of the compiler. The end ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    16

    Question sound - running an mp3 with winamp

    Ok, what I'm trying to do is run a file with a separate executable outside of the compiler. The end result I'm trying to accomplish is an alarm clock; at the desired time it will run a function which will open an mp3 using winamp.exe. I've tried using the system() command, but this does not produce the desired results, as it only runs an executable file and cannot use another with that execution. I have also tried to use the 'spawnl' command I found in a tutorial on this site under 'Running Execs,' but this appears only to be able to run an executable also, although I could not get it to work anyway (some error that seemed to appear within my process.h library...). If anyone has any information on this, I would greatly appreciate it! Thanks!

  2. #2
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    WinExec("mymp3.mp3", SW_SHOW);
    This *may* work.. otherwise, you may be able to open winamp with a parameter.. say..
    WinExec("C:/Winamp/Winamp.exe /PLAY mymp3.mp3", SW_SHOW)

    May also work..
    Last edited by Dual-Catfish; 02-27-2002 at 07:02 PM.

  3. #3
    uvacow
    Guest

    stdlib

    using the stdlib, u can run dos commands. i saved winamp version 2.1 because it gave easy instructions on how to run in dos. i would use code such as

    system("C:\winamp\winamp.exe /Play songname.mp3");

    not sure what the correct winamp command is, but i think that is close.

    cow

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    16

    Thank you!

    I've been working on this for days now, and thanks to you guys, it's finally working perfectly! I'm incredibly grateful, thanks so much.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. multithreading question
    By ichijoji in forum C++ Programming
    Replies: 7
    Last Post: 04-12-2005, 10:59 PM
  2. Low latency sound effects
    By VirtualAce in forum Game Programming
    Replies: 0
    Last Post: 12-21-2004, 12:58 AM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  4. DirectSound - multiple sounds
    By Magos in forum Game Programming
    Replies: 9
    Last Post: 03-03-2004, 03:33 PM
  5. sounds?
    By BODYBUILDNERD in forum C++ Programming
    Replies: 6
    Last Post: 12-06-2002, 02:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21