Skip to content

Commit

Permalink
#1723 Initial commit - audio call management feature.
Browse files Browse the repository at this point in the history
-Implements Spring Boot and spring dependency injection - significant code refactoring.
-Creates database repository with Calls table
-Implements AudioManager to update database and manage audio recordings.
-Incomplete: audio playback/outputs, recording and streaming enhancements, and audio calls endpoint.
  • Loading branch information
Dennis Sheirer committed Dec 17, 2023
1 parent b54e94d commit f7e1b45
Show file tree
Hide file tree
Showing 183 changed files with 6,785 additions and 3,666 deletions.
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ plugins {
id 'java'
id 'idea'
id 'org.beryx.runtime' version '1.12.7'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
}

repositories {
Expand Down Expand Up @@ -103,22 +105,26 @@ dependencies {
implementation 'com.mpatric:mp3agic:0.9.1'
implementation 'commons-io:commons-io:2.11.0'
implementation 'eu.hansolo:charts:1.0.5'
implementation 'io.github.dsheirer:libusb4java-darwin-aarch64:1.3.1' //usb4java native lib for OSX M1 cpu
implementation 'io.github.dsheirer:radio-reference-api:15.1.9'
implementation 'javax.usb:usb-api:1.0.2'
implementation 'net.coderazzi:tablefilter-swing:5.5.4'
implementation 'org.apache.commons:commons-compress:1.21'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.apache.commons:commons-csv:1.9.0'
implementation 'org.apache.derby:derby'
implementation 'org.apache.derby:derbytools'
implementation 'org.apache.mina:mina-core:2.2.1'
implementation 'org.apache.mina:mina-http:2.2.1'
implementation 'org.controlsfx:controlsfx:11.1.2'
implementation 'org.rauschig:jarchivelib:1.2.0'
implementation 'org.slf4j:slf4j-api:2.0.5'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.usb4java:libusb4java:1.3.0'
implementation 'org.usb4java:usb4java:1.3.0'
implementation 'org.usb4java:usb4java-javax:1.3.0'
implementation 'io.github.dsheirer:libusb4java-darwin-aarch64:1.3.1' //usb4java native lib for OSX M1 cpu
implementation 'pl.edu.icm:JLargeArrays:1.6'
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/github/dsheirer/alias/AliasModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
import javafx.collections.ObservableList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
* Alias Model contains all aliases and is responsible for creation and management of alias lists. Alias lists are a
* set of aliases that all share a common alias list name and can be attached to a decoding channel for aliasing
* identifiers produced by channel decoder(s).
*/
@Component("aliasModel")
public class AliasModel
{
private final static Logger mLog = LoggerFactory.getLogger(AliasModel.class);
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/io/github/dsheirer/audio/AbstractAudioModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package io.github.dsheirer.audio;

import io.github.dsheirer.alias.AliasList;
import io.github.dsheirer.audio.call.AudioSegment;
import io.github.dsheirer.identifier.IdentifierUpdateListener;
import io.github.dsheirer.identifier.IdentifierUpdateNotification;
import io.github.dsheirer.identifier.MutableIdentifierCollection;
Expand Down Expand Up @@ -89,7 +90,7 @@ protected void closeAudioSegment()
{
mAudioSegment.completeProperty().set(true);
mIdentifierUpdateNotificationBroadcaster.removeListener(mAudioSegment);
mAudioSegment.decrementConsumerCount();
mAudioSegment.removeLease(getClass().toString());
mAudioSegment = null;
}
}
Expand All @@ -98,6 +99,10 @@ protected void closeAudioSegment()
@Override
public void stop()
{
if(getAudioSegment().isDuplicate())
{
mLog.warn("Audio Module [" + getClass() + "] stop() invoked AND DUPLICATE=TRUE is detected");
}
closeAudioSegment();
}

Expand All @@ -112,7 +117,7 @@ public AudioSegment getAudioSegment()
if(mAudioSegment == null)
{
mAudioSegment = new AudioSegment(mAliasList, getTimeslot());
mAudioSegment.incrementConsumerCount();
mAudioSegment.addLease(getClass().toString());
mAudioSegment.addIdentifiers(mIdentifierCollection.getIdentifiers());
mIdentifierUpdateNotificationBroadcaster.addListener(mAudioSegment);

Expand All @@ -123,7 +128,6 @@ public AudioSegment getAudioSegment()

if(mAudioSegmentListener != null)
{
mAudioSegment.incrementConsumerCount();
mAudioSegmentListener.receive(mAudioSegment);
}

Expand Down
Loading

0 comments on commit f7e1b45

Please sign in to comment.