# turning audio playback volume off

**URL:** <https://psychtoolbox.discourse.group/t/turning-audio-playback-volume-off/664>\
**Category:** Uncategorized\
**Created:** [January 28, 2009, 5:57pm UTC](https://psychtoolbox.discourse.group/t/turning-audio-playback-volume-off/664 "2009-01-28T17:57:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [January 28, 2009, 5:57pm UTC](https://psychtoolbox.discourse.group/t/turning-audio-playback-volume-off/664/1 "2009-01-28T17:57:28Z")

</div>

Hello,  
  
I am a very inexperienced programmer, trying to program for the first time using   
Psychophysic Toolbox.   
  
I want to program a video that only plays when you hold the mouse pointer over the   
embedded video screen.   
  
I have got the video image to freeze when you move the mouse away, but because the loop is   
constantly refreshing, you get a juddering noise on the audio.   
  
I thought the easiest solution to this was merely to set audio volume to 0 when the video   
playback pauses, and then back to normal when it recommences...  
  
But I can't work out how to do this! After three hours of trying!  
  
Please help.  
  
Sam

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [February 1, 2009, 6:03pm UTC](https://psychtoolbox.discourse.group/t/turning-audio-playback-volume-off/664/2 "2009-02-01T18:03:49Z")

</div>

PlayMoviesDemoOSX.m contains everything you'll need.  
Press Cursor down/up keys to pause/resume playback,  
then go through the code that handles those keys  
to see how it is done.  
  
-mario  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "samuel\_wass" \<samuel\_wass@...\> wrote:  
> \>  
> \> Hello,  
> \>   
> \> I am a very inexperienced programmer, trying to program for the first time using   
> \> Psychophysic Toolbox.   
> \>   
> \> I want to program a video that only plays when you hold the mouse pointer over the   
> \> embedded video screen.   
> \>   
> \> I have got the video image to freeze when you move the mouse away, but because the   
> loop is   
> \> constantly refreshing, you get a juddering noise on the audio.   
> \>   
> \> I thought the easiest solution to this was merely to set audio volume to 0 when the video   
> \> playback pauses, and then back to normal when it recommences...  
> \>   
> \> But I can't work out how to do this! After three hours of trying!  
> \>   
> \> Please help.  
> \>   
> \> Sam  
> \>
