Audacity 3.2.0
|
Works with libsndfile to provide encoding and other file information. More...
#include "FileFormats.h"
#include "wxArrayStringEx.h"
#include "Internat.h"
#include "MemoryX.h"
#include "BasicUI.h"
#include <Types.h>
Go to the source code of this file.
Macros | |
#define | NUM_HEADERS 13 |
Functions | |
int | sf_num_headers () |
Get the number of container formats supported by libsndfile. More... | |
wxString | sf_header_index_name (int format) |
Get the name of a container format from libsndfile. More... | |
unsigned int | sf_header_index_to_type (int i) |
int | sf_num_encodings () |
Get the number of data encodings libsndfile supports (in any container or none. More... | |
wxString | sf_encoding_index_name (int i) |
Get the string name of the data encoding of the requested format. More... | |
unsigned int | sf_encoding_index_to_subtype (int i) |
wxString | sf_header_name (int format) |
Get the string name of the specified container format. More... | |
wxString | sf_header_shortname (int format) |
Get an abbreviated form of the string name of the specified format. More... | |
wxString | sf_header_extension (int format) |
Get the most common file extension for the given format. More... | |
wxString | sf_encoding_name (int encoding) |
Get the string name of the specified data encoding. More... | |
int | sf_num_simple_formats () |
SF_FORMAT_INFO * | sf_simple_format (int i) |
bool | sf_subtype_more_than_16_bits (unsigned int format) |
bool | sf_subtype_is_integer (unsigned int format) |
int | sf_subtype_bytes_per_sample (unsigned int format) |
sampleFormat | sf_subtype_to_effective_format (unsigned int format) |
Choose the narrowest value in the sampleFormat enumeration for a given libsndfile format. More... | |
FileExtensions | sf_get_all_extensions () |
wxString | sf_normalize_name (const char *name) |
static OSType | sf_header_mactype (int format) |
Variables | |
static SF_FORMAT_INFO | g_format_info |
OSType | MacNames [NUM_HEADERS] |
Works with libsndfile to provide encoding and other file information.
Definition in file FileFormats.cpp.
#define NUM_HEADERS 13 |
Definition at line 290 of file FileFormats.cpp.
wxString sf_encoding_index_name | ( | int | encoding_num | ) |
Get the string name of the data encoding of the requested format.
uses SFC_GET_FORMAT_SUBTYPE
Definition at line 79 of file FileFormats.cpp.
References sf_normalize_name().
Referenced by anonymous_namespace{ExportPCM.cpp}::GetEncodings(), and ImportRawDialog::ImportRawDialog().
unsigned int sf_encoding_index_to_subtype | ( | int | i | ) |
Definition at line 90 of file FileFormats.cpp.
Referenced by anonymous_namespace{ExportPCM.cpp}::GetEncodings(), and ImportRawDialog::ImportRawDialog().
wxString sf_encoding_name | ( | int | encoding_num | ) |
Get the string name of the specified data encoding.
AND encoding_num with SF_FORMAT_SUBMASK to get only the data encoding and then use SFC_GET_FORMAT_INFO to get the description
encoding_num | the libsndfile encoding to get the name for (only the data encoding is used) |
Definition at line 152 of file FileFormats.cpp.
References sf_normalize_name().
FileExtensions sf_get_all_extensions | ( | ) |
Definition at line 236 of file FileFormats.cpp.
wxString sf_header_extension | ( | int | format | ) |
Get the most common file extension for the given format.
AND the given format with SF_FORMAT_TYPEMASK to get just the container format, then retrieve the most common extension using SFC_GET_FORMAT_INFO.
format | the libsndfile format to get the name for (only the container part is used) |
Definition at line 141 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, and LAT1CTOWX.
Referenced by ExportPCM::GetFormatInfo().
wxString sf_header_index_name | ( | int | format_num | ) |
Get the name of a container format from libsndfile.
Uses SFC_GET_FORMAT_MAJOR in the sf_command() interface. Resulting C string from libsndfile is converted to a wxString
format_num | The libsndfile format number for the container format required |
Definition at line 42 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, and LAT1CTOWX.
Referenced by anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFEditor::ExportOptionsSFEditor().
unsigned int sf_header_index_to_type | ( | int | i | ) |
Definition at line 54 of file FileFormats.cpp.
Referenced by anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFEditor::ExportOptionsSFEditor().
|
static |
Definition at line 318 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, MacNames, and NUM_HEADERS.
wxString sf_header_name | ( | int | format | ) |
Get the string name of the specified container format.
AND format with SF_FORMAT_TYPEMASK to get only the container format and then use SFC_GET_FORMAT_INFO to get the description
format | the libsndfile format to get the name for (only the container part is used) |
Definition at line 106 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, and LAT1CTOWX.
Referenced by PCMImportFileHandle::GetFileDescription(), and PCMExportProcessor::Initialize().
wxString sf_header_shortname | ( | int | format | ) |
Get an abbreviated form of the string name of the specified format.
Do sf_header_name() then truncate the string at the first space in the name to get just the first word of the format name.
format | the libsndfile format to get the name for (only the container part is used) |
Definition at line 117 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, and LAT1CTOWX.
Referenced by ExportPCM::GetFormatInfo(), anonymous_namespace{ExportPCM.cpp}::LoadEncoding(), and anonymous_namespace{ExportPCM.cpp}::SaveEncoding().
wxString sf_normalize_name | ( | const char * | name | ) |
Definition at line 270 of file FileFormats.cpp.
References LAT1CTOWX, name, and wxT().
Referenced by sf_encoding_index_name(), and sf_encoding_name().
int sf_num_encodings | ( | ) |
Get the number of data encodings libsndfile supports (in any container or none.
Definition at line 70 of file FileFormats.cpp.
Referenced by anonymous_namespace{ExportPCM.cpp}::GetEncodings(), and ImportRawDialog::ImportRawDialog().
int sf_num_headers | ( | ) |
Get the number of container formats supported by libsndfile.
Uses SFC_GET_FORMAT_MAJOR_COUNT in sf_command interface
Definition at line 32 of file FileFormats.cpp.
Referenced by anonymous_namespace{ExportPCM.cpp}::ExportOptionsSFEditor::ExportOptionsSFEditor().
int sf_num_simple_formats | ( | ) |
Definition at line 163 of file FileFormats.cpp.
SF_FORMAT_INFO * sf_simple_format | ( | int | i | ) |
Definition at line 174 of file FileFormats.cpp.
References g_format_info.
int sf_subtype_bytes_per_sample | ( | unsigned int | format | ) |
Definition at line 202 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format.
Referenced by PCMExportProcessor::Initialize().
bool sf_subtype_is_integer | ( | unsigned int | format | ) |
Definition at line 194 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format.
Referenced by AUPImportFileHandle::AddSamples(), and PCMExportProcessor::Initialize().
bool sf_subtype_more_than_16_bits | ( | unsigned int | format | ) |
Definition at line 185 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format.
Referenced by AUPImportFileHandle::AddSamples(), PCMExportProcessor::Initialize(), and sf_subtype_to_effective_format().
sampleFormat sf_subtype_to_effective_format | ( | unsigned int | format | ) |
Choose the narrowest value in the sampleFormat enumeration for a given libsndfile format.
Definition at line 224 of file FileFormats.cpp.
References anonymous_namespace{ExportPCM.cpp}::format, int16Sample, int24Sample, sf_subtype_more_than_16_bits(), and widestSampleFormat.
Referenced by ImportRaw(), and PCMImportFileHandle::PCMImportFileHandle().
|
static |
Definition at line 172 of file FileFormats.cpp.
Referenced by sf_simple_format().
OSType MacNames[NUM_HEADERS] |
Definition at line 302 of file FileFormats.cpp.
Referenced by sf_header_mactype().