Thread: Midi

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    5

    Question Midi

    Hi. I was wondering if someone could tell me how to play an mp3 and midi in a windows 32 application, USING MVC++ 6.0


  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Copied from MSDN for midi (can't find it on the online version)-

    Code:
    BOOL PlayMidi(char *sFileName) { 
        char buf[256]; 
    	sprintf(buf, "open %s type sequencer alias MUSIC", sFileName);   
    	if (mciSendString("close all", NULL, 0, NULL) != 0)  
    	{ return(FALSE);     }  
        if (mciSendString(buf, NULL, 0, NULL) != 0)     { return(FALSE);     }
    	if (mciSendString("play MUSIC from 0", NULL, 0, g_hWnd) != 0)    
    	{ return(FALSE);     }    
    	// Yahoo!  
       return TRUE; }
    I believe you can play mp3's using DirectShow, but if this is too much work there's probably plenty of third party libraries that will play them, try searching on google.
    zen

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    5
    What would i search for on google?

  4. #4
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    c++ mp3 library
    zen

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to play midi music from resource without directX
    By alaphate in forum Windows Programming
    Replies: 0
    Last Post: 03-12-2009, 08:49 AM
  2. Guitar Hero ALSA MIDI output
    By redxine in forum Linux Programming
    Replies: 0
    Last Post: 01-24-2009, 11:03 PM
  3. Intercept the MIDI Out
    By MattMik in forum C++ Programming
    Replies: 2
    Last Post: 10-18-2007, 02:05 AM
  4. Playing a Midi. (win32 console) (MSVC++)
    By knave in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 10:40 AM
  5. Converting from MIDI to WAV/DLLs
    By sean in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 10-27-2002, 11:31 AM