how to control the output device of soundsc?

34 次查看(过去 30 天)
When I use soundsc to play an audio signal, the audio is played through the speakers, even when the headphones are connected.
Other MATLAB sounds (such as errors) are played through the headphones.
How can I get soundsc to use the headphones?
(I recently moved from windows to mac. In windows it was no problem as soundsc used the output device defined by the operating system)
Thanks!
  2 个评论
Geoff Hayes
Geoff Hayes 2020-1-31
Tom - what happens if you use the audio player? I'm pretty sure that I was able to use headphones (on my Mac) with this player.
Tom Shlomo
Tom Shlomo 2020-1-31
It's the same when I use audio player.
I should add that this problem does not always happen, sometimes I can get sound out of my headphones.
I am pretty sure this issue is related to the one described in this post.

请先登录,再进行评论。

采纳的回答

Jamie Haas
Jamie Haas 2023-3-27
This can happen when you plug in headphones after Matlab has been launched.
Running the following command worked for me:
audiodevreset
You can see the list of devices that matlab sees by running:
info = audiodevinfo
and then viewing the struct returned to info variable.

更多回答(1 个)

Can Xu
Can Xu 2021-9-20
Any updates on this issue?

类别

Help CenterFile Exchange 中查找有关 Instrument Control Toolbox Supported Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by