Results 1 to 11 of 11

Thread: Music Playing

  1. #1

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Music Playing

    Is there a general, non 3rd party control way to play all kinds of music files? I have seen code that plays wav files (PlaySound API), other code for MP3s (DirectShow)... Is there any general way to play them all or do I need the separate code for each one?

    Thanks
    Last edited by manavo11; Jul 3rd, 2005 at 05:30 PM.


    Has someone helped you? Then you can Rate their helpful post.

  2. #2
    Addicted Member
    Join Date
    May 2005
    Posts
    168

    Re: Music Playing

    Hi,

    I think windows media player covers most of them like wav and mp3..not sure about real audio. API function sndplay can't handle mp3 format as far as I know.

    Have a good one!
    BK

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Music Playing

    I think you mean DirectPlay, which plays these:

    'the loader will correctly parse the following file formats:
    '.WAV; .MID; .SEG; .RMI
    'IT WONT LOAD MP3 files, if you require MP3 audio then look
    'at the DirectShow8 tutorials.

  4. #4

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Music Playing

    No, I mean DirectShow, some code I found from Jacob...


    Has someone helped you? Then you can Rate their helpful post.

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Music Playing

    I'm pretty sure this is DirectPlay. I use it to play MIDI's but it plays the ones that I listed. It's in the code, though.
    Attached Files Attached Files

  6. #6

    Thread Starter
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Music Playing

    So that will work for wav files as well?


    Has someone helped you? Then you can Rate their helpful post.

  7. #7
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Music Playing

    Yes. the listed types were .WAV; .MID; .SEG; .RMI

  8. #8
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871

    Re: Music Playing

    How about mciSendString? I know it plays all common music formats. Does it come with Media Player or so?
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  9. #9
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Music Playing

    Quote Originally Posted by dglienna
    I think you mean DirectPlay, which plays these:
    DirectPlay is for networking, like the Winsock control. DirectSound covers wavs. DirectMusic covers midis. And DirectShow covers mp3s, mpegs, avis, and other media formats.

  10. #10
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Music Playing

    try the windows media player control in the components section.......i have used it and i think it can play many types of formats.

  11. #11
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: Music Playing

    DirectX gives you more control over the media though. You can even put a movie as a texture on a polygon, and control how fast/slow the movie is playing, etc.

    My DirectShow engine gives you nearly total control over the mp3s, which allows you to control the position, volume, balance, speed, play, stop, pause, etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width