SoundOut1.Filename

Justin Lolofie lolofie at unlv.edu
Thu Feb 6 23:46:47 UTC 2003


Thank you for your help, I am posting another solution to be archived:

The following code was found in the experiment "Grosjean 1996" at
http://step.psy.cmu.edu/scripts/

####################
Dim PlaySound As SoundOut
Dim PlaySoundSoundBuffer As SoundBuffer

Set PlaySoundSoundBuffer = PlaySound.Buffers(1)
PlaySoundSoundBuffer.Filename = c.GetAttrib("SoundFileName")
PlaySoundSoundBuffer.Load
PlaySound.Run
####################


Thanks again!

Justin Lolofie




On Thu, 6 Feb 2003, Susan Campbell wrote:

> The best way I have found to change the filename is to set the filename
> from within the SoundOut object to be an attribute reference.  The
> filename can then be changed with c.SetAttrib "attributeName", "filename"
> from within the procedure, or can (obviously) be varied with the list.
>
> As for your second question, I'm not sure about offsets, as I haven't used
> them personally.  It seems like if you need the file to start from a
> certain timepoint, you may want to cut the file and add a seperate file
> that starts from the particular timepoint.  These offsets have nothing to
> do, as far as I can tell, with when the file starts playing, but rather
> with where in the file play begins.
>
> Hope this helps,
> Susan Campbell
> STEP Project
> Carnegie Mellon
>
> On Wed, 5 Feb 2003, Justin Lolofie wrote:
> >
> > I am trying to play different .wav files with the same SoundOut object.
> > However, when I try to change the filename:
> >
> > 	SoundOut1.Filename = "nextfile.wav"
> >
> > I get the error "Filename is not an assignable property of the object".
> > Does anyone know how to change the filename of a SoundOut object?
> >
>
>
>



More information about the Eprime mailing list