Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
adding audio to a visual display

Subject: adding audio to a visual display

From: Krista

Date: 7 Jan, 2009 23:19:02

Message: 1 of 2

Hello,

I am trying to add .wav files to an existing visual display. Currently, the program displays one constant image (on both sides of a screen, using the 'flip' command), and another changing image using a loop and displaying it only on one side of the screen. What I need is to add the .wav which will play once and continuously while the constant image is up. Using wavplay, I've so far only been able to play the .wav before or after the changing image is displayed once. Any help would be great!

Thanks,
Krista

Subject: adding audio to a visual display

From: Jiro Doke

Date: 8 Jan, 2009 02:53:02

Message: 2 of 2

"Krista " <deleeuw@psych.ucsb.edu.remove.this> wrote in message <gk3d96$8pn$1@fred.mathworks.com>...
> Hello,
>
> I am trying to add .wav files to an existing visual display. Currently, the program displays one constant image (on both sides of a screen, using the 'flip' command), and another changing image using a loop and displaying it only on one side of the screen. What I need is to add the .wav which will play once and continuously while the constant image is up. Using wavplay, I've so far only been able to play the .wav before or after the changing image is displayed once. Any help would be great!
>
> Thanks,
> Krista

Krista,

I suggest using "audioplayer"

>> doc audioplayer

Here's the online documentation:

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/audioplayer.html

This will allow you to do other things (like display images) while the sound is playing and also allows you to stop the sound when you want to.

Hope this helps.

jiro

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us