mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Adds error handling for module startup to processing chain and adds file
existance checking for recording files before attempting to create them.
This commit is contained in:
@@ -96,6 +96,16 @@ public class WaveWriter implements AutoCloseable
|
||||
*/
|
||||
private void open() throws IOException
|
||||
{
|
||||
int version = 2;
|
||||
|
||||
while( Files.exists( mFile ) )
|
||||
{
|
||||
mFile = Paths.get( mFile.toFile().getAbsolutePath()
|
||||
.replace( ".wav", "_" + version + ".wav" ) );
|
||||
|
||||
version++;
|
||||
}
|
||||
|
||||
Files.createFile( mFile );
|
||||
|
||||
mFileChannel = (FileChannel.open( mFile, StandardOpenOption.WRITE ) );
|
||||
|
||||
Reference in New Issue
Block a user