Audacity 3.2.0
Public Member Functions | List of all members
WavPackImportPlugin Class Referencefinal

An ImportPlugin for WavPack data. More...

Inheritance diagram for WavPackImportPlugin:
[legend]
Collaboration diagram for WavPackImportPlugin:
[legend]

Public Member Functions

 WavPackImportPlugin ()
 
 ~WavPackImportPlugin ()
 
wxString GetPluginStringID () override
 
TranslatableString GetPluginFormatDescription () override
 
std::unique_ptr< ImportFileHandleOpen (const FilePath &Filename, AudacityProject *) override
 
- Public Member Functions inherited from ImportPlugin
virtual wxString GetPluginStringID ()=0
 
virtual TranslatableString GetPluginFormatDescription ()=0
 
virtual FileExtensions GetSupportedExtensions ()
 
virtual TranslatableString FailureHint () const
 User visible message suggesting what to do when a file type isn't recognized; default empty string. More...
 
bool SupportsExtension (const FileExtension &extension)
 
virtual std::unique_ptr< ImportFileHandleOpen (const FilePath &Filename, AudacityProject *)=0
 
virtual ~ImportPlugin ()
 

Additional Inherited Members

- Protected Member Functions inherited from ImportPlugin
 ImportPlugin (FileExtensions supportedExtensions)
 
- Protected Attributes inherited from ImportPlugin
const FileExtensions mExtensions
 

Detailed Description

An ImportPlugin for WavPack data.

Definition at line 43 of file ImportWavPack.cpp.

Constructor & Destructor Documentation

◆ WavPackImportPlugin()

WavPackImportPlugin::WavPackImportPlugin ( )

Definition at line 87 of file ImportWavPack.cpp.

88: ImportPlugin(FileExtensions(exts.begin(), exts.end()))
89{
90}
wxArrayStringEx FileExtensions
Definition: Identifier.h:225
static const auto exts
ImportPlugin(FileExtensions supportedExtensions)

◆ ~WavPackImportPlugin()

WavPackImportPlugin::~WavPackImportPlugin ( )

Definition at line 92 of file ImportWavPack.cpp.

93{
94}

Member Function Documentation

◆ GetPluginFormatDescription()

TranslatableString WavPackImportPlugin::GetPluginFormatDescription ( )
overridevirtual

Implements ImportPlugin.

Definition at line 101 of file ImportWavPack.cpp.

102{
103 return DESC;
104}
#define DESC

References DESC.

◆ GetPluginStringID()

wxString WavPackImportPlugin::GetPluginStringID ( )
overridevirtual

Implements ImportPlugin.

Definition at line 96 of file ImportWavPack.cpp.

97{
98 return wxT("libwavpack");
99}
wxT("CloseDown"))

References wxT().

Here is the call graph for this function:

◆ Open()

std::unique_ptr< ImportFileHandle > WavPackImportPlugin::Open ( const FilePath Filename,
AudacityProject  
)
overridevirtual

Implements ImportPlugin.

Definition at line 106 of file ImportWavPack.cpp.

107{
108 char errMessage[100]; // To hold possible error message
109 int flags = OPEN_WVC | OPEN_FILE_UTF8 | OPEN_TAGS | OPEN_DSD_AS_PCM | OPEN_NORMALIZE;
110 WavpackContext *wavpackContext = WavpackOpenFileInput(filename, errMessage, flags, 0);
111
112 if (!wavpackContext) {
113 // Some error occured(e.g. File not found or is invalid)
114 wxLogDebug("WavpackOpenFileInput() failed on file %s, error = %s", filename, errMessage);
115 return nullptr;
116 }
117
118 auto handle = std::make_unique<WavPackImportFileHandle>(filename, wavpackContext);
119
120 return std::move(handle);
121}

The documentation for this class was generated from the following file: