Home How to select and manipulate different audio drivers in Java for Windows
Reply: 1

How to select and manipulate different audio drivers in Java for Windows

Ahmad Shoaib
1#
Ahmad Shoaib Published in 2017-12-06 03:46:14Z

I have a scenario in which I have different soundcards on a system. I want to play audiostreams on different soundcards in such a way that if one soundcard is playing audio, other will not play it.

Let say I have soundcards A, B and C And I have Audio Streams Audio1,Audio2,Audio3

I want

Soundcard A to play Audio2, meanwhile Soundcard B and C wont play the audio.
Soundcard B to play Audio3, meanwhile Soundcard A and C wont play the audio.
Soundcard A to play Audio2, meanwhile Soundcard A and B wont play the audio.

How would I manipulate the different sound drivers in this case using Java. The OS I am using is Windows. I would be grateful if someone helps me in this regards.

Turbo WhizKid
2#
Turbo WhizKid Reply to 2017-12-17 01:38:56Z

You need to use the JNI interface and call the the selection from C++ code to to the Windows API. The code to enumerated Windows devices is SetupDiGetClassDevs will allow you the select any control panel device programmatically. However, your Java Native Interface code "Windows module" would not work on an android tablet... The java code on Windows is portable to AndroidStudio so your paint graphics functions, dialog boxes, key/touch listeners, would be mostly the same. The JNI "Windows module" would not be needed on Android. JNI for AndroidStudio requires a 64bit platform to compile c++ for Android devices. So AndroidStudio does indeed have a JNI interface; you just wouldn't be able to call SetupDiGetClassDevs Windows style because Android is based in Linux.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.308303 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO