c# - How to use offset parameter of StreamCreateFile in BASS library? -
i trying use bass library audio editing, if familiar library can me.
the function i'm using
bass.bass_streamcreatefile(filename, offset, length, flags);
for little background, i'm using bass.net wrapper, working mp3 files. actual code i'm using function is:
int basestream = bass.bass_streamcreatefile(filename, starttimebytes, durationbasebytes, bassflag.bass_stream_prescan | bassflag.bass_stream_decode | bassflag.bass_sample_float);
whenever offset (starttimebytes) equals 0, stream created fine, whenever offset non-zero, method returns 0, , error code given bass_error_fileform. however, files used work fine without offset (offset = 0).
maybe there wrong flags i'm using or something?
your mp3 files contain frames without offset. use 0
offset.
set playback position of stream use bass_channelsetposition().
- create stream offset = 0;
- translate time (seconds) position bytes, based on channel's format using bass_channelseconds2bytes();
- set position bass_channelsetposition() ,
bass_pos_byte
mode.
Comments
Post a Comment