Thread: MP3 player?

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470

    MP3 player?

    Hi.
    I want to build a basic MP3 playing program without using DirectX functions. What’s the best way to do this? Please give me some tips.
    Thanks.

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    You can use mci:
    Code:
    #include <windows.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    #if defined(_MSC_VER) || defined(__BORLANDC__)
    #pragma comment(lib, "winmm.lib")
    #endif
    
    int main(void)
    {
    	mciSendString("Play welcome.mp3", NULL, 0, NULL);
    	//mciSendString("Play welcome.mp3 from 10 to 10000", NULL, 0, NULL);
    
    	getchar();
    	return EXIT_SUCCESS;
    }
    For some idea of the commands you can use, see this MP3 player that uses MCI:
    http://visumod.freeshell.org/mp3player/mp3player.html
    or this one:
    http://www.basicguru.com/files/abc/a...M09/sonido.bas
    or search:
    http://www.google.com/search?q=mcisendstring%20mp3
    or read the documentation:
    http://msdn.microsoft.com/library/de..._win32_mci.asp

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 11-03-2008, 09:48 PM
  2. mp3 player
    By cmyoung23 in forum C++ Programming
    Replies: 8
    Last Post: 09-13-2007, 12:11 PM
  3. Speaker suggestions for MP3 player
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 05-08-2007, 03:06 AM
  4. which Portable mp3 player?
    By Raihana in forum A Brief History of Cprogramming.com
    Replies: 27
    Last Post: 01-09-2004, 07:58 AM