Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Can DirectShow play Mp3 stream?

Can DirectShow play Mp3 stream?

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cyrus Dang
    wrote on last edited by
    #1

    Dear all, DirectSound allows us to play WAV from both file and stream. However, it cannot play Mp3 file. DirectShow is able to play Mp3 file. So how can I play Mp3 from a stream? Thanks in advance.

    H J H 3 Replies Last reply
    0
    • C Cyrus Dang

      Dear all, DirectSound allows us to play WAV from both file and stream. However, it cannot play Mp3 file. DirectShow is able to play Mp3 file. So how can I play Mp3 from a stream? Thanks in advance.

      H Offline
      H Offline
      hmklakmal
      wrote on last edited by
      #2

      i dont know Directshow playing audio.DirectAudio can play mp3s. i'm not really interested about it.so i cant say how. Kanchana

      1 Reply Last reply
      0
      • C Cyrus Dang

        Dear all, DirectSound allows us to play WAV from both file and stream. However, it cannot play Mp3 file. DirectShow is able to play Mp3 file. So how can I play Mp3 from a stream? Thanks in advance.

        J Offline
        J Offline
        Justin Tay
        wrote on last edited by
        #3

        Exactly what are you trying to accomplish here? For DirectShow the whole Mp3 file isn't loaded into the buffer when you try to play it. If you have some Mp3 data in your application and would like to play this without writing to disk you would probably have to write your own source filter.

        C 1 Reply Last reply
        0
        • C Cyrus Dang

          Dear all, DirectSound allows us to play WAV from both file and stream. However, it cannot play Mp3 file. DirectShow is able to play Mp3 file. So how can I play Mp3 from a stream? Thanks in advance.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          if you want to play mp3 you can use MCI functions_**


          **_

          whitesky


          C 1 Reply Last reply
          0
          • J Justin Tay

            Exactly what are you trying to accomplish here? For DirectShow the whole Mp3 file isn't loaded into the buffer when you try to play it. If you have some Mp3 data in your application and would like to play this without writing to disk you would probably have to write your own source filter.

            C Offline
            C Offline
            Cyrus Dang
            wrote on last edited by
            #5

            Yes, that is exactly what I needed. I have a buffer in memory and I know for sure it is in Mp3 format. Then I want to play it without saving to disk. Can you tell me more about the filter? Thanks!

            J 1 Reply Last reply
            0
            • H Hamid Taebi

              if you want to play mp3 you can use MCI functions_**


              **_

              whitesky


              C Offline
              C Offline
              Cyrus Dang
              wrote on last edited by
              #6

              I'm not sure mci functions can play a buffer in Mp3 format. Surely, MCI functions are the best approach to play Mp3 files. But in my case, I'm not sure they work. Anyway, thanks for your response. Regards,

              1 Reply Last reply
              0
              • C Cyrus Dang

                Yes, that is exactly what I needed. I have a buffer in memory and I know for sure it is in Mp3 format. Then I want to play it without saving to disk. Can you tell me more about the filter? Thanks!

                J Offline
                J Offline
                Justin Tay
                wrote on last edited by
                #7

                You can get the DirectShow wizard to generate the boilerplate code for a push source filter and start from there. http://tmhare.mvps.org/downloads.htm[^] There is also a Bouncing Ball source filter sample in the SDK. Aside from that you would probably need to ask a more specific question.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups