none
Problem with Sound not rewinding RRS feed

  • Question

  • I noticed that version 0.4 included a fix in that Sound.play will rewind after playing a sound.  However I cannot make this work with a loaded sound...it does work with the built-in sounds though.  i.e. with the following code:

    GraphicsWindow.Show()
    
    Timer.Interval = 2000
    Timer.Tick = OnTick
    
    Sub OnTick
        Sound.Play("g:\sbtest\laser.wav")
    EndSub

    The sound only plays on the first loop through the subroutine.  If I insert a Sound.Stop first, then it plays every time or if I substitute it for Sound.PlayBellRing then it seems to rewind OK and play every time.

    Is this something I'm doing wrong, or does the rewind function only work with inbuilt sounds ?
    I tried several different wav's with the same result.
    • Edited by OzJerry Monday, May 11, 2009 3:02 AM
    Monday, May 11, 2009 3:01 AM

Answers

  • OzJerry,

    This is a bug in the Sound.Play operation.  I'll take a note of this and get this fixed for v0.5.

    Thanks.
    • Marked as answer by OzJerry Monday, May 11, 2009 8:55 AM
    Monday, May 11, 2009 6:01 AM
    Moderator

All replies

  • OzJerry,

    This is a bug in the Sound.Play operation.  I'll take a note of this and get this fixed for v0.5.

    Thanks.
    • Marked as answer by OzJerry Monday, May 11, 2009 8:55 AM
    Monday, May 11, 2009 6:01 AM
    Moderator
  • Thanks Vijay.  Appreciate your continued work on Small Basic.
    Monday, May 11, 2009 8:56 AM
  • I agree with OzJerry :-) thx a lot
    Tuesday, May 26, 2009 12:37 PM
  • In 0.6, I can now play individual .wma sound files with Sound.Play (thanks very much).  However, playing a sound stops execution of the program.  Is there a way for the program to continue?  This is a countdown timer so the timer and its display must continue while the sound is being playes.

    TIA

    Dan
    Sunday, August 23, 2009 8:32 PM
  • For me Sound.Play starts the playing and continues program execution, while Sound.PlayAndWait starts the playing and waits for it to finish before continuing program execution.

    Perhaps you could provide a code sample that we can run showing the issue.
    Sunday, August 23, 2009 9:08 PM
    Moderator