Results 1 to 3 of 3

Thread: Need some help with audio playback

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2011
    Posts
    1

    Need some help with audio playback

    Hey guys and gals, thanks for taking a look.
    Basically my program has a "shuffle" music feature:

    vb Code:
    1. For i = 0 To 26
    2.             num = randomObject.Next(0, 27)
    3.             My.Computer.Audio.Play("C:\Users\Mcturtles\Music\Songs\" & num & ".wav", AudioPlayMode.BackgroundLoop)
    4.         Next

    Which selects a random number 0 - 26 and selects the corresponding song.

    And a straight play feature:

    vb Code:
    1. Dim counter As Integer
    2.         Do Until counter > 26
    3.             My.Computer.Audio.Play("C:\users\mcturtles\music\songs\" & counter & ".wav", AudioPlayMode.WaitToComplete)
    4.             counter += 1
    5.         Loop

    All of these activated by a button(separate for each)

    When I click one, it makes the program stop responding. I'm pretty sure it is the .WaitToComplete mode, but I can't find a way to make it continuously play without it. If you can find my error, it would be greatly appreciated.

    Also if you could tell me a way to make the shuffle never play the same song twice, that would be awesome as well.


    Thanks,
    Mcturtles
    Last edited by gep13; Mar 22nd, 2011 at 02:24 AM. Reason: Added Highlight Tags

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