Converts the project to use a licensed WAVE file reader.

This is easier to distribute.
This commit is contained in:
Markil3
2021-07-24 14:12:42 -07:00
parent 97985044f8
commit adf4cea82c
19 changed files with 850 additions and 379 deletions

View File

@@ -3,6 +3,8 @@
*/
package edu.regis.universeplayer.localPlayer;
import com.intervigil.wave.WaveReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -10,8 +12,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.LinkedList;
import wave.WavHeader;
/**
* This allows for the control of playback of files on the local file system
*
@@ -36,11 +36,11 @@ public class Player
*/
public void setCurrentFile(AudioFile file)
{
WavHeader header = file.getHeader();
WaveReader header = file.getHeader();
this.currentFile = file;
// TODO - Ensure that bytes per sample and bits per sample don't bother things
this.currentId = this.setCurrentFile(this.currentFile, header.getNumChannels(), header
.getBitsPerSample(), header.getSampleRate());
this.currentId = this.setCurrentFile(this.currentFile, (short) header.getChannels(), (short) header
.getPcmFormat(), header.getSampleRate());
}
/**