Results 1 to 11 of 11

Thread: Playing sound [SEMI-resolved]

  1. #1

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Playing sound [SEMI-resolved]

    Doe anyone know how I can write a program to play sound but don't just want to use the API:
    VB Code:
    1. Private Declare Function sndPlaySound& Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long)
    Because I also what to be able to pause and use an equalizer. I don't mind if you only know of controls that do this but I'd prefer to be able to do this from just code.
    Thanx for any help.
    Last edited by Electroman; Mar 28th, 2003 at 05:21 PM.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    You can use the Microsoft Multimedia Control 6.0. Under the play button add :

    VB Code:
    1. Private Sub cmdPlay_Click()
    2.  If Not mciPlayer.Mode = mciModeNotOpen Then
    3.   mciPlayer.Command = "Close"
    4.  End If
    5.  mciPlayer.FileName = 'set a filename here
    6.  mciPlayer.Command = "Open"
    7.  mciPlayer.Command = "Play"
    8. End Sub

    And under the stop button add :

    VB Code:
    1. Private Sub cmdStop_Click()
    2.   mciPlayer.Command = "Close"
    3. End Sub


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

  3. #3
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141
    Attached is a multimedia project I put together while working through a lesson one time. It is all API driven.
    Attached Files Attached Files

  4. #4

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Thanx but its important that I can have a equalizer and I don't think the Microsoft Multimedia Control 6.0 had it when I was playing with it earlier. As for the project MarkT i don't know if yours has one but i'll have a look in a minute when I come off-line.
    Thanx anyway tho.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Check this out.


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

  6. #6

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    I looked at the file at the other form manavo11 and its really great but i'm not sure how I can use this to create an equalizer, you know what I mean? like to adjust the amount of bass and treble being played.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  7. #7
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Is this anything like what you want?


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

  8. #8
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Don't have time to look through. Check it out.


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

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


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

  10. #10

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    I've sort of solved the problem, I've managed to put the attached project together so far. Its made up of mainly the first example manavo11 gave a link to, but I've added my own code using some tutorials. I added the Procedure "ApplyEq()" but it only sort of works, I think its just that I can't work out what values to use for the frequenceys and bandwidths, if you look at the code I've marked out in the "ApplyEq()" procedure what I mean. Thanx for all the links tho manavo11.
    Does anyone have any ideas?
    Thanx
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  11. #11

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Heres the file...
    Attached Files Attached Files
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

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