mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Updates pull request from Roman Tsypuk to convert the build system from
ant to gradle. Removes linux and windows application launch scripts and produces an executable jar with all resources included.
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
package io.github.dsheirer.source.mixer;
|
||||
|
||||
import javax.sound.sampled.Mixer;
|
||||
|
||||
public class MixerChannelConfiguration
|
||||
{
|
||||
private Mixer mMixer;
|
||||
private MixerChannel mMixerChannel;
|
||||
|
||||
public MixerChannelConfiguration( Mixer mixer, MixerChannel channel )
|
||||
{
|
||||
mMixer = mixer;
|
||||
mMixerChannel = channel;
|
||||
}
|
||||
|
||||
public Mixer getMixer()
|
||||
{
|
||||
return mMixer;
|
||||
}
|
||||
|
||||
public MixerChannel getMixerChannel()
|
||||
{
|
||||
return mMixerChannel;
|
||||
}
|
||||
|
||||
public boolean matches( String mixer, String channels )
|
||||
{
|
||||
return mixer != null &&
|
||||
channels != null &&
|
||||
mMixer.getMixerInfo().getName().contentEquals( mixer ) &&
|
||||
mMixerChannel.name().contentEquals( channels );
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append( mMixer.getMixerInfo().getName() );
|
||||
sb.append( " - " );
|
||||
sb.append( mMixerChannel.name() );
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ( ( mMixer == null ) ? 0 : mMixer.hashCode() );
|
||||
result = prime * result
|
||||
+ ( ( mMixerChannel == null ) ? 0 : mMixerChannel.hashCode() );
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object obj )
|
||||
{
|
||||
if ( this == obj )
|
||||
return true;
|
||||
if ( obj == null )
|
||||
return false;
|
||||
if ( getClass() != obj.getClass() )
|
||||
return false;
|
||||
MixerChannelConfiguration other = (MixerChannelConfiguration) obj;
|
||||
if ( mMixer == null )
|
||||
{
|
||||
if ( other.mMixer != null )
|
||||
return false;
|
||||
} else if ( !mMixer.equals( other.mMixer ) )
|
||||
return false;
|
||||
if ( mMixerChannel != other.mMixerChannel )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user