Results 1 to 3 of 3

Thread: How can I find information on axmediaplayer?

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2007
    Location
    Silly Clone Valley CA
    Posts
    47

    How can I find information on axmediaplayer?

    I am using the media player com component(axmediaplayer) for a personal project I'm working on. the project is called "the slumber machine", it's basically an ambient music player (ie relaxing, chilled out, drones, and music to sleep). I have a bunch of samples that I've created over the years so I have them in a folder and the Slumbermachine randomly plays the samples using a random playback speed. So far it works pretty good, but...

    What I want to figure out is how to determine when a track is going to end and fade it out so it will fade out the end of the song and fade back in on the next sample. Here is the code I'm using so far:

    Code:
        
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    
    If AxMediaPlayer1.CurrentPosition = AxMediaPlayer1.SelectionEnd - 10 Then
            If Not BackgroundWorker2.IsBusy Then
                   BackgroundWorker2.RunWorkerAsync()
            End If
    End If
    
    End Sub
    
    Private Sub BackgroundWorker2_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker2.DoWork
    
    VolumeFadeOut1()
        End Sub
    
    Private Sub VolumeFadeOut1()
    Do While AxMediaPlayer1.Volume > -6000
             AxMediaPlayer1.Volume = AxMediaPlayer1.Volume - 100
             System.Threading.Thread.Sleep(300)
    Loop
    
    End Sub
    This kind of works, but it seems very unreliable and crash prone. Unfortunately the media player volume works where 0 is the highest volume and -6000 seems to be the lowest.

    So is there any info I can read to learn more about this com component?

    Thanks bunches!
    Last edited by SlumberMachine; Aug 15th, 2007 at 10:58 PM.

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