mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
#660 Updates audio processing subsystem to use audio segments. Updates audio playback, recording and streaming to use audio segments. Adds support to UserPreferences for sound card selection and audio tone insertion during playback. Adds record preference for WAVE or MP3. Resolves issues with metadata in recordings. (#675)
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
/*
|
||||
* *****************************************************************************
|
||||
* Copyright (C) 2014-2020 Dennis Sheirer
|
||||
*
|
||||
* * ******************************************************************************
|
||||
* * Copyright (C) 2014-2019 Dennis Sheirer
|
||||
* *
|
||||
* * This program is free software: you can redistribute it and/or modify
|
||||
* * it under the terms of the GNU General Public License as published by
|
||||
* * the Free Software Foundation, either version 3 of the License, or
|
||||
* * (at your option) any later version.
|
||||
* *
|
||||
* * This program is distributed in the hope that it will be useful,
|
||||
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* * GNU General Public License for more details.
|
||||
* *
|
||||
* * You should have received a copy of the GNU General Public License
|
||||
* * along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* * *****************************************************************************
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* ****************************************************************************
|
||||
*/
|
||||
|
||||
package io.github.dsheirer.identifier;
|
||||
@@ -41,7 +38,6 @@ public class IdentifierCollection
|
||||
private final static Logger mLog = LoggerFactory.getLogger(IdentifierCollection.class);
|
||||
protected List<Identifier> mIdentifiers = new ArrayList<>();
|
||||
protected AliasListConfigurationIdentifier mAliasListConfigurationIdentifier;
|
||||
private boolean mUpdated = false;
|
||||
private int mTimeslot = 0;
|
||||
|
||||
/**
|
||||
@@ -94,19 +90,6 @@ public class IdentifierCollection
|
||||
mTimeslot = timeslot;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates if this identifier collection contains an updated list of identifiers.
|
||||
*/
|
||||
public boolean isUpdated()
|
||||
{
|
||||
return mUpdated;
|
||||
}
|
||||
|
||||
public void setUpdated(boolean updated)
|
||||
{
|
||||
mUpdated = updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias List configuration identifier containing the name of the alias list for this collection.
|
||||
* @return alias list or null
|
||||
@@ -319,4 +302,19 @@ public class IdentifierCollection
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Identifier Collection - Timeslot:").append(mTimeslot).append("\n");
|
||||
for(Identifier identifier: getIdentifiers())
|
||||
{
|
||||
sb.append("\t").append(identifier.toString());
|
||||
sb.append("\t{").append(identifier.getIdentifierClass().name()).append("|")
|
||||
.append(identifier.getForm().name()).append("|")
|
||||
.append(identifier.getRole().name()).append("}");
|
||||
sb.append("\t").append(identifier.getClass()).append("\n");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ public class MutableIdentifierCollection extends IdentifierCollection implements
|
||||
*/
|
||||
private void notifyAdd(Identifier identifier)
|
||||
{
|
||||
setUpdated(true);
|
||||
if(mListener != null)
|
||||
{
|
||||
mListener.receive(new IdentifierUpdateNotification(identifier, IdentifierUpdateNotification.Operation.ADD, getTimeslot()));
|
||||
@@ -110,7 +109,6 @@ public class MutableIdentifierCollection extends IdentifierCollection implements
|
||||
*/
|
||||
private void notifyRemove(Identifier identifier)
|
||||
{
|
||||
setUpdated(true);
|
||||
if(mListener != null)
|
||||
{
|
||||
mListener.receive(new IdentifierUpdateNotification(identifier,
|
||||
@@ -409,8 +407,6 @@ public class MutableIdentifierCollection extends IdentifierCollection implements
|
||||
public IdentifierCollection copyOf()
|
||||
{
|
||||
IdentifierCollection copy = new IdentifierCollection(getIdentifiers(), getTimeslot());
|
||||
copy.setUpdated(isUpdated());
|
||||
setUpdated(false);
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* *****************************************************************************
|
||||
* Copyright (C) 2014-2020 Dennis Sheirer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* ****************************************************************************
|
||||
*/
|
||||
|
||||
package io.github.dsheirer.identifier.string;
|
||||
|
||||
import io.github.dsheirer.identifier.Form;
|
||||
import io.github.dsheirer.identifier.IdentifierClass;
|
||||
import io.github.dsheirer.identifier.Role;
|
||||
import io.github.dsheirer.protocol.Protocol;
|
||||
|
||||
/**
|
||||
* Simple string identifier
|
||||
*/
|
||||
public class SimpleStringIdentifier extends StringIdentifier
|
||||
{
|
||||
public SimpleStringIdentifier(String value, IdentifierClass identifierClass, Form form, Role role)
|
||||
{
|
||||
super(value, identifierClass, form, role);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Protocol getProtocol()
|
||||
{
|
||||
return Protocol.UNKNOWN;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user