audio files and delays
Peter Quain
pquain at une.edu.au
Mon Aug 24 16:57:19 UTC 2009
Whooops .. thought I was clicking save, not send... better finish
this now, then :)
there's probably some much simpler way to do this that i don't know
about, but you could do it with code.
Need to do something with SoundBuffer I think ... no idea whether
this will work, but might be one track to look at for preloading
audio info into memory.
'make a collection of soundbuffers
Dim mySoundBuffers As SoundBufferCollection
Set mySoundBuffers = new SoundBufferCollection
'add buffers to hold as many audio files as needed for a trial
mySoundBuffers.Add sBuffer1, , ,
mySoundBuffers.Add sBuffer2, , ,
mySoundBuffers.Add sBuffer3, , ,
'set the file for the buffer to hold
sBuffer1.FileName = "myWavFile-1.wav"
sBuffer2.FileName = "myWavFile-2.wav"
sBuffer3.FileName = "myWavFile-3.wav"
'load the buffer into memory
sBuffer1.Load
sBuffer2.Load
sBuffer3.Load
.....
'play the appropriate file
If cond = "whatever" Then
sBuffer1.Play
ElseIf cond = "another" Then
sBuffer2.Play
Else
sBuffer3.Play
End If
~Peter
At 02:13 AM 25/08/2009, you wrote:
>I have not figured out how to cache. Getting the sample script from E-
>Prime is taking longer than I hoped. Does anybody have it?
>
>So this issue is unresolved. Any other thoughts?
>
>Thanks again.
>Conrad
>
>
>
>On Aug 21, 11:22 am, Conrad <cmwar... at gmail.com> wrote:
> > I am running XP. I see from other discussions streaming is the way to
> > go.
> >
> > I've tried changing the SoundDeviceOutput properties but that didn't
> > help.
> >
> > I have changed the duration of the slide to multiples of the refresh
> > rate and that helped a little.
> >
> > Next up for my game plan is to cache these audio files, if I can
> > figure out how to do that.
> >
> > Thanks for the help!
> >
> > On Aug 20, 1:48 pm, David McFarlane <mcfar... at msu.edu> wrote:
> >
> > > Conrad,
> >
> > > Since you mention streaming mode, you must be using EP2, which
> > > answers the first question. Next question, are you running this
> > > under Windows XP, or Vista?
> >
> > > -- David McFarlane, Professional Faultfinder
> >
> > > >Hi all,
> >
> > > >I am developing a task which includes audio files. My samples loop
> > > >pretty fast. This is how it looks.
> > > >Slide 1: 350 ms with audio clip (1 of 12 audio files)
> > > >Slide 2: 50 ms of black screen buffer
> > > >Slide 3: 600 ms with audio clip (same audio file every time); collect
> > > >response
> > > >Slide 4: 100 ms of black screen buffer.
> > > >Repeat 2500 times.
> >
> > > >I have noticed that i get a pretty significant delay 150 ms with each
> > > >audio file. This delay seems to grow quite a bit by the end of the
> > > >task to 500 ms.
> >
> > > >I've played around with the pre-release, audio buffer time, and
> > > >streaming vs. buffered audio files and I haven't found a combination
> > > >where the audio file will completely play and I don't have a massive
> > > >delay.
> >
> > > >Anybody have any thoughts or suggestions?
> >
> > > >Thanks,
> > > >Conrad
> > > >Madison, WI
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---
More information about the Eprime
mailing list