
com.bugvm.sound.YLine Maven / Gradle / Ivy
/*
* Copyright (C) 2017 BugVM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bugvm.sound;
import javax.sound.sampled.*;
import java.util.*;
public class YLine implements Line {
Line.Info info;
//
boolean isOpen = false;
//
java.util.concurrent.ConcurrentHashMap linelisteners = new java.util.concurrent.ConcurrentHashMap();
//
public YLine() {
//
}
//
public YLine(Line.Info info) {
this.info = info;
if(Boolean.getBoolean("YDEBUG"))
{
System.out.println("returning from YLine(Line.Info info)");
}
}
//
@Override
public Line.Info getLineInfo() {
return this.info;
}
@Override
public void open() throws LineUnavailableException {
//System.out.println("YLine open()");
isOpen = true;
//
YNative.Initialize();
if(Boolean.getBoolean("YDEBUG")) {
int devices = YNative.GetDeviceCount();
System.out.println("GetDeviceCount " + devices);
for(int i=0;i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy