How do you get a TargetDataLine from a Mixer Info (Java Sound API)? -
first off, not experienced @ sound api , looking quick advice. have mixer object , targetdataline
want use record using mixer. here have gotten:
final targetdataline line; try { line = (targetdataline) mixer.getline(mixer.getlineinfo()); } catch (lineunavailableexception e) { e.printstacktrace(); }
however, code passes illegalargumentexception
when executed.
exception in thread "thread-14" java.lang.illegalargumentexception: line unsupported: interface mixer @ com.sun.media.sound.directaudiodevice.getline(unknown source) @ net.minecraft.src.sequenceaudiohandler.run(sequenceaudiohandler.java:32)
does have idea why happening? sorry if lacking basic knowledge, i'm still trying learn.
the problem || in tests. if line not supported has name accept viable mixer. when try , line later on illegalargumentexception
- "if mixer not support lines matching description" per documentation.
if trying line can record audio microphone suggest question/answer: java sound api - capturing microphone
Comments
Post a Comment