how to control the output device of soundsc?

39 ビュー (過去 30 日間)
Tom Shlomo
Tom Shlomo 2020 年 1 月 30 日
コメント済み: Kaspar Lucattini 2023 年 11 月 1 日
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 件のコメント
Kaspar Lucattini
Kaspar Lucattini 2023 年 11 月 1 日
Hi there, this worked for me, thanks!

サインインしてコメントする。

その他の回答 (1 件)

Can Xu
Can Xu 2021 年 9 月 20 日
Any updates on this issue?

カテゴリ

Help Center および File ExchangeInstrument 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