diff data/fileio/AudioFileReaderFactory.h @ 920:f3cda3280398 tonioni

Add normalised option to CodedAudioFileReader
author Chris Cannam
date Fri, 13 Jun 2014 16:03:48 +0100
parents 183ee2a55fc7
children d03b3d956358
line wrap: on
line diff
--- a/data/fileio/AudioFileReaderFactory.h	Fri Jun 13 12:56:31 2014 +0100
+++ b/data/fileio/AudioFileReaderFactory.h	Fri Jun 13 16:03:48 2014 +0100
@@ -43,6 +43,9 @@
      * if you want to find out whether the file is being resampled
      * or not.
      *
+     * If normalised is true, the file data will be normalised to
+     * abs(max) == 1.0. Otherwise the file will not be normalised.
+     *
      * If a ProgressReporter is provided, it will be updated with
      * progress status.  Caller retains ownership of the reporter
      * object.
@@ -51,6 +54,7 @@
      */
     static AudioFileReader *createReader(FileSource source,
                                          size_t targetRate = 0,
+                                         bool normalised = false,
                                          ProgressReporter *reporter = 0);
 
     /**
@@ -65,6 +69,9 @@
      * if you want to find out whether the file is being resampled
      * or not.
      *
+     * If normalised is true, the file data will be normalised to
+     * abs(max) == 1.0. Otherwise the file will not be normalised.
+     *
      * If a ProgressReporter is provided, it will be updated with
      * progress status.  This will only be meaningful if threading
      * mode is not used because the file reader in use does not
@@ -76,11 +83,13 @@
      */
     static AudioFileReader *createThreadingReader(FileSource source,
                                                   size_t targetRate = 0,
+                                                  bool normalised = false,
                                                   ProgressReporter *reporter = 0);
 
 protected:
     static AudioFileReader *create(FileSource source,
                                    size_t targetRate,
+                                   bool normalised,
                                    bool threading,
                                    ProgressReporter *reporter);
 };