Results 1 to 9 of 9

Thread: DirectShow to play Mp3 + Select Sound Card

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Question DirectShow to play Mp3 + Select Sound Card

    WinXP VB6 SP6

    Hi,

    I have been playing with member Jacob Roman's
    http://www.vbforums.com/member.php?50926-Jacob-Roman
    DirectShow Mp3 Example.zip
    http://www.vbforums.com/attachment.p...9&d=1321884599

    This great code uses DirectShow to play Mp3s and gives control over speed of the song, volume, balance, position, play, pause, stop, and loop, and it all works Great

    But it does not let you select the Sound Card

    I know it is possible to select sound card with DirectShow but I have NOT managed find the correct code for it yet.

    Any help to include a Select Sound Card into this code would be great


  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: DirectShow to play Mp3 + Select Sound Card

    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: DirectShow to play Mp3 + Select Sound Card

    Quote Originally Posted by LaVolpe View Post
    In one word NO
    That article clearly states...
    This code should be called after the wave file to be played has been opened by MMControl1.
    Thanks for the reply but

    My original post was...

    DirectShow to play Mp3 + Select Sound Card

    So...
    I would like to use DirectShow (quartz.dll) to play MP3 files and have the possibility of Selecting the Sound Card.

    Thanks for looking anyway
    Last edited by BriansBrain; Sep 2nd, 2014 at 06:09 AM.

  4. #4
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: DirectShow to play Mp3 + Select Sound Card

    You may have to write it yourself.
    Try searching for ICreateDevEnum and see if you can find the information to start writing or converting to VB6.
    Or, you could just select the Default Audio output in Sound Dialog of the control panel.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: DirectShow to play Mp3 + Select Sound Card

    Quote Originally Posted by passel View Post
    You may have to write it yourself.
    Try searching for ICreateDevEnum and see if you can find the information to start writing or converting to VB6.
    I have looked at other code for DirectShow that selects the sound card but I have not managed to migrate it into the original code from Jacob Roman's.


    Quote Originally Posted by passel View Post
    Or, you could just select the Default Audio output in Sound Dialog of the control panel.
    I need to have the Default Audio Output untouched for the Main-Sound-Output and use a Second sound card as a Pre-Main-Output Monitor

    Thanks for looking

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: DirectShow to play Mp3 + Select Sound Card

    Duplicate post deleted
    Last edited by BriansBrain; Sep 2nd, 2014 at 08:07 AM.

  7. #7
    Sinecure devotee
    Join Date
    Aug 2013
    Location
    Southern Tier NY
    Posts
    6,598

    Re: DirectShow to play Mp3 + Select Sound Card

    Quote Originally Posted by BriansBrain View Post
    I have looked at other code for DirectShow that selects the sound card but I have not managed to migrate it into the original code from Jacob Roman's.
    ...
    Do you have example code that selects the sound card that looks promising, but you're having trouble porting, so you can give a more specific issue to work on?

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: DirectShow to play Mp3 + Select Sound Card

    Quote Originally Posted by passel View Post
    Do you have example code that selects the sound card that looks promising, but you're having trouble porting, so you can give a more specific issue to work on?
    Here is some modified code originally from Part of the Microsoft DXSDK Code Samples.

    Name:  SelectCard.jpg
Views: 953
Size:  13.1 KB

    This code works for me.
    I can select a sound card to play mp3.

    Pleas note sounds boards are very different in there description I have moded the code for cards I use.

    You might have to play with that part of the code to make it work.

    Attached Files Attached Files
    Last edited by BriansBrain; Sep 6th, 2014 at 06:30 AM.

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Oct 2009
    Location
    Gran Canaria, Spain.
    Posts
    101

    Re: DirectShow to play Mp3 + Select Sound Card

    Here is another from the Part of the Microsoft DXSDK Code Samples.

    Name:  MP3 Player.jpg
Views: 1075
Size:  42.5 KB

    This one is very similar to Jacob Roman's code.

    As it does not have a Sound Card Select either

    But it could be useful to mod
    Attached Files Attached Files

Tags for this Thread

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