Midi

This is a discussion on Midi within the C++ Programming forums, part of the General Programming Boards category; Hi. I was wondering if someone could tell me how to play an mp3 and midi in a windows 32 ...

  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
    zen
    zen is offline
    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
    zen
    zen is offline
    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, 09: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, 03:05 AM
  4. Playing a Midi. (win32 console) (MSVC++)
    By knave in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 11: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

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