Package javax.sound.sampled

Examples of javax.sound.sampled.LineUnavailableException


    @Override
    public synchronized void startRecording(String recordingId, String mixer, float gain) throws LineUnavailableException {

        if (isRecording || m_line != null || (m_line != null && m_line.isOpen())) {
            throw new LineUnavailableException();
        }

        AudioFormat audioFormat = new AudioFormat(16000.0F, 16, 1, true, true);
        audioFormat = getBestAudioFormat(audioFormat, mixer);
        DataLine.Info info = new DataLine.Info(TargetDataLine.class, audioFormat);
View Full Code Here


    @Override
    public synchronized void startRecording(String recordingID, final String mixer, float gain) throws LineUnavailableException {


        if (isRecording || m_line != null || (m_line != null && m_line.isOpen())) {
            throw new LineUnavailableException();
        }


        String safeFileName = Slugger.generateSlug(recordingID);
View Full Code Here

    if (outputMixer.isOpen()) {
      outputMixer.close();
    }

    if (inputLine == null || outputLine == null) {
      throw new LineUnavailableException();
    }

    inputLine.open(SOUND_FORMAT, BUFFER_SIZE);
    outputLine.open(SOUND_FORMAT, BUFFER_SIZE);
View Full Code Here

    // this will open the output device and start the output thread
    // note that this takes the buffer size in frames.
    // GM_ResumeGeneralSound
    private void nOpen(int index, float sampleRate, int sampleSizeInBits, int channels, int bufferSize) throws LineUnavailableException
    {
     throw new LineUnavailableException();
    }
View Full Code Here

                                             format.getFrameSize(),
                                             format.getFrameRate(),
                                             sid.format.isBigEndian());
                }
                if (!ok || !format.matches(sid.format)) {
                    throw new LineUnavailableException("Requested format incompatible with already established device format: " + sid.format);
                }
            }
        }
View Full Code Here

        this.format = format;
        this.bufferSize = bufferSize;

        // throw an exception if we failed
        if (id == 0) {
            throw new LineUnavailableException("Failed to allocate native stream.");
        }

        if (Printer.debug) Printer.debug("MixerSourceLine: constructor: id = " + id);
        if (Printer.trace) Printer.trace("<< MixerSourceLine: implOpen succeeded");
View Full Code Here

                pusher.start();

            } catch (LineUnavailableException e) {
                if (isOpen())
                    close();
                throw new LineUnavailableException(e.toString());
            }

        }
    }
View Full Code Here

    public AudioInputStream openStream(AudioFormat targetFormat)
            throws LineUnavailableException {

        if (isOpen())
            throw new LineUnavailableException("Mixer is already open");

        synchronized (control_mutex) {

            open = true;
View Full Code Here

TOP

Related Classes of javax.sound.sampled.LineUnavailableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.