INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to detect end of stream in a DSP plugin?  (Read 2312 times)

krmasson

  • World Citizen
  • ***
  • Posts: 212
How to detect end of stream in a DSP plugin?
« on: March 04, 2018, 04:28:28 am »

Hello there,

I am trying to write a DSP plugin for Media Center, in order to "smartly" add silence at end of some tracks.
I started from the StutterDSPPlugin provided in the SDK.

But I see no mean of detecting the end of the stream? At first glance, I thought I could rely on the number of samples sent to CMJStutterDSPPlugin::Process() (incomplete block meaning end of stream).

It appears that the number of blocks sent to CMJStutterDSPPlugin::Process() is rather irregular: it is usually 16384, but every 3rd or 4th block, a "magic" value comes:2646, 1291 or 1796, that I was unable to correlate to some "round" number (e.g. 20000 - 16384, or 44100 - some multiple of 16384).

Any thoughts about that?

Or maybe should I use another kind of plugin? Basically, I want to add 2 or 3 blank seconds at end of stream, depending on the last few tenths of second of the sream.

Thanks in advance.
CM
Logged

krmasson

  • World Citizen
  • ***
  • Posts: 212
Re: How to detect end of stream in a DSP plugin?
« Reply #1 on: March 19, 2018, 02:59:30 pm »

Hello, any thoughts?
Logged
Pages: [1]   Go Up