Playing .mp3 with MCI - Not working :S

Hello forum,

I have earlier posted about having problem with the MCI libary and I got it to work. But because my computer's hard disk broke I can't look in my old files.

So I need help once again (sorry) :(

Here is my code for loading and playing the song I choose from the filedialog:

Includes for MCI:
1
2
#pragma comment(lib, "WinMM.lib")
#include <MMSystem.h> 


Loading and playing code:
1
2
3
4
5
6
7
8
9
10
11
12
DWORD mp3_open(TCHAR *filename) { 

	TCHAR command[MAX_PATH] = L"open \"";
	_tcscat(command,filename);
	_tcscat(command,L"\" type mpegvideo alias musicfile");
	command[_tcslen(command)] = 0;

	mciSendString(command, NULL, 0, 0);
	mciSendString(L"play musicfile", NULL, 0, 0);

	return 0;
}


File path (read from debug):
"D:\Dokumenter\Musik\Electro House Collection 37\Addy van der Zwan & Koen Groeneveld & Rehab - Fastevil (Franky Rizardo Remix).mp3"
Command string (read from debug):
"open "D:\Dokumenter\Musik\Electro House Collection 37\Addy van der Zwan & Koen Groeneveld & Rehab - Fastevil (Franky Rizardo Remix).mp3" type mpegvideo alias musicfile"

Where's the problem?

Regards,

Simon H.A.
Topic archived. No new replies allowed.