Results 1 to 2 of 2

Thread: How to Play part of a .wav File in VB2008 or VB2010?

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    37

    How to Play part of a .wav File in VB2008 or VB2010?

    In VB6 you could specify exactly which part of a .wav file you wanted to play. (There were From and To parameters.) You did not have to play it all.

    The VB 2008 or VB2010 code

    My.Computer.Audio.Play(FireString, AudioPlayMode.Background)

    does not seem to allow this.

    How can I specify which part I want to play?

    (I did search the forum but could not find any relevant posts.)

    Thank you,

    Punchy.

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

    Re: How to Play part of a .wav File in VB2008 or VB2010?

    How did you play it in VB6?
    Two choices of the top of my head would be to use Windows Media Player or mciSendString.
    Either one allows you to specify a position to play from.
    I'm not sure about a position to play to (and am not taking the time to search for myself). If there isn't a specific command, you could always monitor the position and stop it yourself.

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