MCI Playing MP3s - Spaces in path

This is a discussion on MCI Playing MP3s - Spaces in path within the Windows Programming forums, part of the Platform Specific Boards category; How do I play MP3s that have spaces in the path name? Code: mciSendString("play \"C:/mp3/hellothere.mp3\"",NULL,0,NULL); works... but: Code: mciSendString("play \"C:/mp3/hello ...

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    2

    Question MCI Playing MP3s - Spaces in path

    How do I play MP3s that have spaces in the path name?

    Code:
    mciSendString("play \"C:/mp3/hellothere.mp3\"",NULL,0,NULL);
    works... but:

    Code:
    mciSendString("play \"C:/mp3/hello there.mp3\"",NULL,0,NULL);
    won't play? Am I making a stupid mistake? I'm not very experienced with this, you see...

    Thanking you in advance,
    -darkrifter.
    Last edited by darkrifter; 06-14-2005 at 06:09 AM.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    2
    I'm not sure how it's in windows, but in console, spaces are just underscores. I might be wrong, but I'm guessing it's probably the same way with windows, since it's still based on DOS. Try using an underscore (_) instead of space.

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    2
    Thanks...

    Another question, how do I get the length of a sound file in seconds?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Vista core audio apis for playing mp3s
    By elmutt in forum Windows Programming
    Replies: 0
    Last Post: 06-03-2008, 04:12 PM
  2. Problems loading mp3s with MCI
    By elmutt in forum Windows Programming
    Replies: 8
    Last Post: 07-31-2007, 10:43 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM
  5. playing midis through the MCI
    By NoOneHere in forum Windows Programming
    Replies: 1
    Last Post: 03-07-2003, 05:20 PM

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