[kde-doc-english] [kwave] /: decoding of Core Audio Format (*.caf), using ALAC, A-LAW, U-LAW and IMA compression

Thomas Eschenbacher Thomas.Eschenbacher at gmx.de
Thu Apr 21 18:09:01 UTC 2016


Git commit 7fc5846dd4df6d7264f0e434552147de92d906cd by Thomas Eschenbacher.
Committed on 21/04/2016 at 18:08.
Pushed by eschenbacher into branch 'master'.

decoding of Core Audio Format (*.caf), using ALAC, A-LAW, U-LAW and IMA compression

M  +2    -0    CHANGES
M  +23   -6    doc/en/index.docbook
M  +0    -1    libkwave/Compression.cpp
M  +3    -2    libkwave/Compression.h
M  +4    -1    plugins/codec_audiofile/AudiofileDecoder.cpp

http://commits.kde.org/kwave/7fc5846dd4df6d7264f0e434552147de92d906cd

diff --git a/CHANGES b/CHANGES
index c43519b..ae61ff7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,8 @@
  * removed optimized memcpy for PowerPC
  * record plugin: improved handling of error messages
  * record plugin: added retry mechanism in case of device busy
+ * decoding of Core Audio Format (*.caf), using ALAC, A-LAW, U-LAW and IMA
+   compression
 
 0.9.1 [2016-02-21]
 
diff --git a/doc/en/index.docbook b/doc/en/index.docbook
index ab75b13..a84c553 100644
--- a/doc/en/index.docbook
+++ b/doc/en/index.docbook
@@ -1807,12 +1807,14 @@
 	</para></listitem>
 
 	<listitem><para>
-	    Additionally &kwave; supports many other common formats through the
-	    <ulink url="&url_libaudiofile;">audiofile</ulink>
-	    plugin. You can import files like <filename>*.au</filename> and
-	    <filename>*.snd</filename> (NeXT,Sun Audio),
-	    <filename>*.aiff</filename> (Audio Interchange Format) and
-	    <filename>*.sf</filename> (Berkeley,IRCAM,Carl Sound Format).
+	    Additionally you can import file formats like
+	    <filename>*.au</filename>  (NeXT, Sun Audio),
+	    <filename>*.aiff</filename> (Audio Interchange Format),
+	    <filename>*.caf</filename> (Core Audio Format),
+	    <filename>*.sf</filename> (Berkeley, IRCAM, Carl Sound Format),
+	    <filename>*.snd</filename> (NeXT, Sun Audio)
+	    and others through the <ulink url="&url_libaudiofile;">audiofile</ulink>
+	    plugin.
 	</para></listitem>
 
     </itemizedlist>
@@ -5561,6 +5563,21 @@
 		<informaltable frame='none'><tgroup cols='2'><tbody>
 		    <row>
 			<entry>&i18n-plugin-lbl_file_type_description;</entry>
+			<entry>Core Audio File Format</entry>
+		    </row>
+		    <row>
+			<entry>&i18n-plugin-lbl_file_type_extensions;</entry>
+			<entry><filename>*.caf</filename></entry>
+		    </row>
+		    <row>
+			<entry>&i18n-plugin-lbl_file_type_mime_types;</entry>
+			<entry><literal>audio/x-caf</literal></entry>
+		    </row>
+		</tbody></tgroup></informaltable>
+
+		<informaltable frame='none'><tgroup cols='2'><tbody>
+		    <row>
+			<entry>&i18n-plugin-lbl_file_type_description;</entry>
 			<entry>Berkeley, IRCAM, Carl Sound Format</entry>
 		    </row>
 		    <row>
diff --git a/libkwave/Compression.cpp b/libkwave/Compression.cpp
index ba5c074..58a1130 100644
--- a/libkwave/Compression.cpp
+++ b/libkwave/Compression.cpp
@@ -161,7 +161,6 @@ void Kwave::Compression::fillMap()
 	sfmt_int, false, false));
 
     /* compression types from libaudiofile (for display only, not supported) */
-
     static const struct {
 	int compression;
 	const char *name;
diff --git a/libkwave/Compression.h b/libkwave/Compression.h
index cfc3913..fd07a43 100644
--- a/libkwave/Compression.h
+++ b/libkwave/Compression.h
@@ -42,12 +42,13 @@ namespace Kwave
 	    G711_ALAW    = AF_COMPRESSION_G711_ALAW,
 	    MS_ADPCM     = AF_COMPRESSION_MS_ADPCM,
 	    GSM          = AF_COMPRESSION_GSM,
+	    FLAC         = AF_COMPRESSION_FLAC,
+	    ALAC         = AF_COMPRESSION_ALAC,
 	    MPEG_LAYER_I = 600,
 	    MPEG_LAYER_II,
 	    MPEG_LAYER_III,
 	    OGG_VORBIS,
-	    OGG_OPUS,
-	    FLAC
+	    OGG_OPUS
 	};
 
 	/**
diff --git a/plugins/codec_audiofile/AudiofileDecoder.cpp b/plugins/codec_audiofile/AudiofileDecoder.cpp
index c2f9b90..3540cfb 100644
--- a/plugins/codec_audiofile/AudiofileDecoder.cpp
+++ b/plugins/codec_audiofile/AudiofileDecoder.cpp
@@ -52,6 +52,9 @@ Kwave::AudiofileDecoder::AudiofileDecoder()
     addMimeType("audio/x-aiff", /* included in KDE */
                 i18n("Audio Interchange Format"),
                 "*.aif; *.AIF; *.aiff; *.AIFF");
+    addMimeType("audio/x-caf",
+                i18n("Core Audio File Format"),
+                "*.caf; *.CAF");
     addMimeType("audio/x-ircam",
                 i18n("Berkeley, IRCAM, Carl Sound Format"),
                 "*.sf; *.SF");
@@ -79,7 +82,7 @@ bool Kwave::AudiofileDecoder::open(QWidget *widget, QIODevice &src)
 
     // try to open the source
     if (!src.open(QIODevice::ReadOnly)) {
-	qWarning("failed to open source !");
+	qWarning("AudiofileDecoder::open(), failed to open source !");
 	return false;
     }
 


More information about the kde-doc-english mailing list