Route audio signal on a RIoTboard with KitKat

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Route audio signal on a RIoTboard with KitKat

ソリューションへジャンプ
1,056件の閲覧回数
Xavier
Contributor III

Hi! I'm facing an annoying problem. I'm currently using a RIoTboard (Android KitKat) with speakers connected to the audio output and a screen (built-in speakers) connected to the HDMI output. I want to route audio signals the following ways:

- Same signal towards all the speakers

- One signal towards the speakers and another one towards the screen

Because of all the abstraction layers, I can't find any solution. Here's what I was looking into:

- Using NDK

- Using AudioManager class and its awfully undocumented setParameters method

- "hacking" Android way of managing audio streams by using streams differently (e.g. music -> alarm stream)

Any clues?

Thanks in advance!

0 件の賞賛
1 解決策
804件の閲覧回数
Xavier
Contributor III

In the end, I've chosen to use the Ringtone class. Indeed, some of the signals, when both speakers and screen are connected, are routed towards the speakers (e.g. notifications) while the others are routed towards the screen.

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
805件の閲覧回数
Xavier
Contributor III

In the end, I've chosen to use the Ringtone class. Indeed, some of the signals, when both speakers and screen are connected, are routed towards the speakers (e.g. notifications) while the others are routed towards the screen.

0 件の賞賛
804件の閲覧回数
saurabh206
Senior Contributor III

Hi

Xavier

You can support for the ALSA and use aplay to play using different soundcard.

Thanks

Saurabh

804件の閲覧回数
Xavier
Contributor III

Is there any way to use aplay from an Android application?

0 件の賞賛
804件の閲覧回数
saurabh206
Senior Contributor III

Hi Xavier

You can use "executeCommand" from Android application.

Like

executeCommand("cat /proc/version");

Hope this helps.

Thanks

Saurabh