Explicitly set the DirScanner handle to NULL (-1 for Windows) on instantiation.
[asdcplib.git] / src / blackwave.cpp
index c84774fa66983fbbfde73eda08b6a4da5208f4c3..a049bee21e144fe56b3602660ce2a9432f0cd4f7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2005, John Hurst
+Copyright (c) 2005-2009, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ using namespace ASDCP;
 //
 // command line option parser class
 
-static const char* PACKAGE = "wavsplit";    // program name for messages
+static const char* PROGRAM_NAME = "blackwave";    // program name for messages
 
 // Macros used to test command option data state.
 
@@ -56,12 +56,12 @@ banner(FILE* stream = stderr)
 {
   fprintf(stream, "\n\
 %s (asdcplib %s)\n\n\
-Copyright (c) 2005-2006 John Hurst\n\n\
-wavesplit is part of asdcplib.\n\
+Copyright (c) 2005-2009 John Hurst\n\n\
+%s is part of asdcplib.\n\
 asdcplib may be copied only under the terms of the license found at\n\
 the top of every file in the asdcplib distribution kit.\n\n\
 Specify the -h (help) option for further information about %s\n\n",
-         PACKAGE, ASDCP::Version(), PACKAGE);
+         PROGRAM_NAME, ASDCP::Version(), PROGRAM_NAME, PROGRAM_NAME);
 }
 
 //
@@ -80,7 +80,7 @@ Other Options:\n\
 \n\
   NOTES: o There is no option grouping, all options must be distinct arguments.\n\
          o All option arguments must be separated from the option by whitespace.\n\
-\n", PACKAGE);
+\n", PROGRAM_NAME);
 }
 
 //
@@ -157,8 +157,8 @@ make_black_wav_file(CommandOptions& Options)
   ADesc.Locked = 0;
   ADesc.ChannelCount = 1;
   ADesc.QuantizationBits = 24;
-  ADesc.BlockAlign = 18;
-  ADesc.AvgBps = 86400;
+  ADesc.BlockAlign = 3;
+  ADesc.AvgBps = 14400;
   ADesc.LinkedTrackID = 1;
   ADesc.ContainerDuration = Options.duration;
 
@@ -167,9 +167,9 @@ make_black_wav_file(CommandOptions& Options)
   memset(FrameBuffer.Data(), 0, FrameBuffer.Capacity());
   FrameBuffer.Size(FrameBuffer.Capacity());
 
-  if ( 1 ) // Options.verbose_flag )
+  if ( Options.verbose_flag )
     {
-      fprintf(stderr, "48Khz PCM Audio, %s fps (%lu spf)\n", "24",
+      fprintf(stderr, "48Khz PCM Audio, %s fps (%u spf)\n", "24",
              PCM::CalcSamplesPerFrame(ADesc));
       fputs("AudioDescriptor:\n", stderr);
       PCM::AudioDescriptorDump(ADesc);