asantoni / libaudiodecoder Goto Github PK
View Code? Open in Web Editor NEWThe Cross-Platform Audio Decoder API
License: Other
The Cross-Platform Audio Decoder API
License: Other
if i specify x86 as target architecture i can build the lib
if i used x86_amd64 as target architecture scons can't find the windows media foundation libs...
no idea why... i have the win 7 sdk installed
os in use is win10
Many functions are inline, as we know in such case we have to provide the definition within the header file. We are getting link issues with such functions.
https://stackoverflow.com/questions/953710/inline-function-linker-error
does this project have a patreon page?
I'm wanting to use libaudiodecoder in my own project, but trying to build it gives errors. Trying to build the "playsong" example also gives me the same errors. I used Visual Studio 2015 to build the PortAudio libraries and dll's, and I used Scons to build the libaudiodecoder libraries and dll's. I also set the project to correctly link against those libraries and put the dll's in my project's directory. However, when I try to build the "playsong" project it outputs this:
1>------ Build started: Project: playsong, Configuration: Release Win32 ------
1> playsong.cpp
1>c:\users\billm\documents\my_files\code\frameworks\libaudiodecoder\include\audiodecoderbase.h(106): warning C4251: 'AudioDecoderBase::m_filename': class 'std::basic_string<char,std::char_traits,std::allocator>' needs to have dll-interface to be used by clients of class 'AudioDecoderBase'
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring(2628): note: see declaration of 'std::basic_string<char,std::char_traits,std::allocator>'
1>C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): error C2512: 'AudioDecoderMediaFoundation': no appropriate default constructor available
1> c:\users\billm\documents\my_files\code\frameworks\libaudiodecoder\include\audiodecodermediafoundation.h(27): note: see declaration of 'AudioDecoderMediaFoundation'
1> C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): note: This diagnostic occurred in the compiler generated function 'AudioDecoder::AudioDecoder(const AudioDecoder &)'
1>C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): error C2437: 'AudioDecoderMediaFoundation': has already been initialized
1> C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): note: This diagnostic occurred in the compiler generated function 'AudioDecoder::AudioDecoder(const AudioDecoder &)'
1>C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1> C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): note: This diagnostic occurred in the compiler generated function 'AudioDecoder &AudioDecoder::operator =(const AudioDecoder &)'
1>C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): error C2059: syntax error: 'AudioDecoderMediaFoundation'
1> C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): note: This diagnostic occurred in the compiler generated function 'AudioDecoder &AudioDecoder::operator =(const AudioDecoder &)'
1>C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): error C2061: syntax error: identifier 'AudioDecoderMediaFoundation'
1> C:\Users\BillM\Documents\My_Files\Code\Frameworks\libaudiodecoder\include\audiodecoder.h(52): note: This diagnostic occurred in the compiler generated function 'AudioDecoder &AudioDecoder::operator =(AudioDecoder &&)'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The README.md of the project states that libaudiodecoder is under the MIT license, but audiodecodermediafoundation.cpp contains a block comment stating it is under the GPL v2 or later. If the entire project is truly under the MIT license, then this comment should be removed (with no effect on any GPL projects using the library) and replaced with the MIT header from the other files. audiodecodermediafoundation.h could benefit from the same header.
I followed the playsong example and got libaudiodecoder working in my own project. However, I want to decode the entire audio file at once and store it in memory instead of decoding during the audio callback function in PortAudio. It's unclear what the correct way to do this is. I assumed that it was this:
float* output = new float[audioDecoder->numSamples()];
int samplesRead = audioDecoder->read(audioDecoder->numSamples(), output);
// since this is just a test to make sure it's working,
// free the output buffer to avoid a memory leak
delete[] output;
But that gave me this error:
Assertion failed!
File: src\audiodecodermediafoundation.cpp
Line: 220
Expression: size < sizeof(m_destBufferShort)
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts
So how am I supposed to create a custom output buffer?
Works in macOS but cant build through command line on Windows 10.
Can you help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.