media - JMF microphone volume controller -


How to obtain a microphone volume controller in JMF?

I have this idea:

I tried to conceive of this implementation, but when I try to get the stream, then one vacuum from the first volume processor Here's how I do it:

  // Device media device is a special processor processoroforvolume = manager.createprocessor (device.lawaketer ()); // Wait until you configure ProcessorStates newState = new ProcessorStateListener (Processor.). Watforescence (processoroforvolum); System.out.println ("Volumeprocetate:" + Newestate); // Setting to clear content emptiness - Reading in the second thread allows this gain control processor to receive ForVolume.setContentDescriptor (null); // Track control format Set up someone supported by device and track control. // I do not match it in any RTP format, but I do not think there is anything to do with it ... TrackControl [] trackControls = processorForVolume.getTrackControls (); If (trackControls.length == 0) throw the new MC_Exception ("No track control is found for this device:", new object [] {device}); (Track control: TrackControl) TrackManipulator. MANIPAL TRACK CONTROL (CONTROL); // Wait until the processor is realized = new processorstylelists (controller. Waitproof processor (processoroforvolum); System.out.println ("Volumeprocetate:" + Newestate); // gain control for micVolumeController = Processor FolVolume.getGainControl (); // can not get the output stream to process ... any suggestions? Processor = manager.credit processor (processoroforvillmgatedataaututput ()); New processor listener (processor configured). Waitproof processor (processor); Processor.setContentDescriptor (DeviceCapturingManager.RAW_RTP); New Processor Property Listener (Controller. Weightproof processor (processor);  

It produces:

Minorprosessorate: set the configured format to track control - com.sun.media.ProcessEngine$ProcTControl@1627c16: LINEAR

and the data output from the processor is null.

I should make it clear that when the content descriptor! = Null I get an output stream, but not the volume controller, and when it is empty I get the controller, but no stream.

I try to connect to an audio microphone device

Adam

Microphone does not have volume components! It is necessary to implement yourself.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -