Sound output latency issue

7 views (last 30 days)
Chi-Hyun Kim
Chi-Hyun Kim on 31 Oct 2012
Hello,
I have a psychological experiment coded in Matlab which presents spoken words at a relatively fast rate (750 milliseconds per word), using the sound function. The experiment also uses the Psychtoolbox toolbox (<http://www.psychtoolbox.org/HomePage>) to handle screen presentation and response logging during the experiment. I have recently moved institutions, and I am finding that the same code which ran well at my previous lab is not behaving correctly using a new setup. Namely, the presentation of the audio is much slower, taking about double the time as usual. I'm not sure whether this is a performance issue related to the computer. Both the computer at my old lab as well as the computer I am currently using are older Dells running Windows XP. The previous computer (on which the program ran fine) is configured like this:
Memory -
Maximum possible array: 1277 MB (1.339e+009 bytes)*
Memory available for all arrays: 1565 MB (1.640e+009 bytes)**
Memory used by MATLAB: 236 MB (2.472e+008 bytes)
Physical Memory (RAM): 3326 MB (3.487e+009 bytes)
* Limited by contiguous virtual address space available.
** Limited by virtual address space available.
MatLab Version - 7.8.0.347 (R2009a)
Psychtoolbox Version - 3.0.8 - Flavor: beta - Corresponds to SVN Revision 1557 but is *locally modified* !
And the current computer:
Matlab: 8.0.0.783 (R2012b)
PsychtoolboxVersion:
3.0.10 - Flavor: beta - Corresponds to SVN Revision 3063
>> memory
Maximum possible array: 706 MB (7.398e+08 bytes) *
Memory available for all arrays: 1459 MB (1.530e+09 bytes) **
Memory used by MATLAB: 332 MB (3.485e+08 bytes)
Physical Memory (RAM): 3326 MB (3.487e+09 bytes)
* Limited by contiguous virtual address space available.
** Limited by virtual address space available.
The size of the audio data that the experiment loads is about 2MB; there is lots of free HD space in the current computer, and defragmenting the drive did not help. The current computer's sound card is SB Audigy 2ZS Audio. I am wondering if either version differences or hardware differences are causing my current setup to run the experiment so slowly.
I would be grateful for any insight!
Thanks,
Chi-Hyun Kim
Dept. of Psychology, University of Pennsylvania
  2 Comments
Star Strider
Star Strider on 31 Oct 2012
This might be most appropriately directed to MathWorks Tech Support.
Jan
Jan on 31 Oct 2012
Edited: Jan on 31 Oct 2012
I cannot find the important detail of the absolute timings. "Much slower" is relative, e.g. if the program needs 0.05 instead of 0.01 seconds. Please post your operating system and the Matlab version, which causes the troubles.

Sign in to comment.

Answers (2)

Jan
Jan on 31 Oct 2012
I had a similar experinece with R2011b: Sounds plyed by sound or audioplayer are delayed by over 1 second under Windows7/64. Under R2009a there is no remarkable delay. The TMW support explained, that this is a known bug and will be updated in R2012a - but unfortunately I cannot afford the update. Therefore 2011b is less charming for me, because my marginal but not unimportant warn, error, message beeps seems to appear more or less randomly.

Daniel Shub
Daniel Shub on 1 Nov 2012
You are not giving us much to work on ...
The rate at which soundcard hardware can be rapidly and repeatedly triggered depends on a number of factors. Calling sound every 750 ms (or even every couple of seconds) is not a good idea. It used to be that you could crash MATLAB by calling sound to quickly and frequently. It might be that your new hardware/MATLAB version behaves differently.
If you are already using psychtoolbox, Why not use its sound commands? They are much better.
Finally, if you are in Psychology at Penn, then you have access to much better resources for psychtoolbox in house than on Answers (your head of department was one of the initial developers).

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!