home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Area 51 - Testing Area
Music Gapless Playback
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="sikkek" data-source="post: 1025539" data-attributes="member: 99454"><p>hwarmann, thanks in advance for all your hard work! Will test a.s.a.p. One question though regarding the technical solution:</p><p> </p><p>Is there a particular reason you're not using the STREAMPROC callback to provide BASS with stream data? That would be truly gapless playback</p><p> </p><p>Simple C++ example:</p><p> </p><p>[CODE]HSTREAM str1,str2,strout;</p><p> </p><p>DWORD CALLBACK MyStreamProc(HSTREAM handle, void *buf, DWORD len, DWORD user)</p><p>{</p><p> DWORD r;</p><p> if (BASS_ChannelIsActive(str1)) { // stream1 has data</p><p> r=BASS_ChannelGetData(str1,buf,len);</p><p> } else if (BASS_ChannelIsActive(str2)) { // stream2 has data</p><p> r=BASS_ChannelGetData(str2,buf,len);</p><p> if (!BASS_ChannelIsActive(str2))</p><p> r|=BASS_STREAMPROC_END; // stream2 has ended, so we're done</p><p> } else r=BASS_STREAMPROC_END;</p><p> return r;</p><p>}</p><p> </p><p>...</p><p> </p><p>BASS_CHANNELINFO info;</p><p>str1=BASS_StreamCreateFile(...,BASS_STREAM_DECODE);</p><p>str2=BASS_StreamCreateFile(...,BASS_STREAM_DECODE);</p><p>BASS_ChannelGetInfo(str1,&info);</p><p>strout=BASS_StreamCreate(info.freq,info.chans,0,&MyStreamProc,0); // create the output stream</p><p>BASS_StreamPlay(strout,0,0);[/CODE]</p><p> </p><p>Off course, when the sample rate/#channels/bitdepth changes, a re-initialisation of the stream is required, but that is no problem, gapless playback (almost) always used for rips of live or mixed cd's, so the files would all have the same properties.</p></blockquote><p></p>
[QUOTE="sikkek, post: 1025539, member: 99454"] hwarmann, thanks in advance for all your hard work! Will test a.s.a.p. One question though regarding the technical solution: Is there a particular reason you're not using the STREAMPROC callback to provide BASS with stream data? That would be truly gapless playback Simple C++ example: [CODE]HSTREAM str1,str2,strout; DWORD CALLBACK MyStreamProc(HSTREAM handle, void *buf, DWORD len, DWORD user) { DWORD r; if (BASS_ChannelIsActive(str1)) { // stream1 has data r=BASS_ChannelGetData(str1,buf,len); } else if (BASS_ChannelIsActive(str2)) { // stream2 has data r=BASS_ChannelGetData(str2,buf,len); if (!BASS_ChannelIsActive(str2)) r|=BASS_STREAMPROC_END; // stream2 has ended, so we're done } else r=BASS_STREAMPROC_END; return r; } ... BASS_CHANNELINFO info; str1=BASS_StreamCreateFile(...,BASS_STREAM_DECODE); str2=BASS_StreamCreateFile(...,BASS_STREAM_DECODE); BASS_ChannelGetInfo(str1,&info); strout=BASS_StreamCreate(info.freq,info.chans,0,&MyStreamProc,0); // create the output stream BASS_StreamPlay(strout,0,0);[/CODE] Off course, when the sample rate/#channels/bitdepth changes, a re-initialisation of the stream is required, but that is no problem, gapless playback (almost) always used for rips of live or mixed cd's, so the files would all have the same properties. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Area 51 - Testing Area
Music Gapless Playback
Contact us
RSS
Top
Bottom