mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
-Fixed stereo file loading issue
This commit is contained in:
parent
b30297f01a
commit
a94a916107
1 changed files with 8 additions and 2 deletions
|
@ -108,8 +108,14 @@ int DiskReader::loadSample( int track, int scene, string path )
|
|||
{
|
||||
/// load the sample
|
||||
SndfileHandle infile( path, SFM_READ );
|
||||
std::vector<float> buf( infile.frames() );
|
||||
infile.read( (float*)&buf[0] , infile.frames() );
|
||||
std::vector<float> buf( infile.frames() * infile.channels() );
|
||||
infile.read( (float*)&buf[0] , infile.frames() * infile.channels() );
|
||||
|
||||
if ( infile.error() )
|
||||
{
|
||||
LUPPP_ERROR("File %s, Error %s", path.c_str(), infile.strError() );
|
||||
return LUPPP_RETURN_ERROR;
|
||||
}
|
||||
|
||||
LUPPP_NOTE("Loading file with %i chnls, frames %i,buffer size %i", infile.channels(), infile.frames(), buf.size() );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue