Giter Site home page Giter Site logo

libaudiodecoder's People

Contributors

asantoni avatar delightrun avatar hendricks266 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libaudiodecoder's Issues

x86_amd64 build fails

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

Can't get libaudiodecoder to work with MS Visual Studio Community 2015

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 ==========

audiodecodermediafoundation.cpp identifies as GPL

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.

What is the correct way create a custom output buffer?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.