Skip to Content

What is stored in RAM ?

1 reply [Last post]
darthvim
Offline
Joined: 04/17/2010

Hi,

i wondered which file format does hydrogen store in ram ?
i am using flac files as soundlibrary - so does hydrogen convert it and store wav in ram ?

wolke
wolke's picture
Offline
Joined: 03/30/2010

hiho,
you find the answer in:

your_h2_dir/libs/hydrogen/src/flac_file.cpp &.h
&
your_h2_dir/libs/hydrogen/src/sample.cpp &.h

------8<-----flac_file.cpp---Sample* FLACFile_real::getSample()---------------

float *data_L = new float[nFrames];
float *data_R = new float[nFrames];

memcpy( data_L, &m_audioVect_L[ 0 ], nFrames * sizeof( float ) );
memcpy( data_R, &m_audioVect_R[ 0 ], nFrames * sizeof( float ) );
pSample = new Sample( nFrames, m_sFilename, data_L, data_R );

------8<-----flac_file.cpp---Sample* FLACFile_real::getSample()---------------

hope that helps.

greetings wolke