Author Topic: missing first and last 33 samples  (Read 206 times)

BaseHead

  • Posts: 138
missing first and last 33 samples
« on: 8 Dec '17 - 06:54 »
Hey Ian!
before for I post any code snippets, is here anything you can think of was when I export file using BASS enc why the destination file is missing the first and last 33 samples from the original file in the destination file?
A few users noticed transients missing on the front of kiks and snares that are are SRC'd so I started to investigate today.
I didn't have NORAMPIN on so I put that on and it helped a lot but it's still not exporting perfect
If I export a 44/24 wav sound thru BASS Enc creating a new 44/24 wav file on both our mac and pc programs the first 33 samples are missing AND the last.  Huh?  hahaha
The screenshot shows me lining up the two and you can see the front 33 never made it to the new file.

I did many tests today with different source files on both Mac and PC of BaseHead with basically the same results.
Is there a setting I can put on to pad the encoding by chance?  If not tell me what i should post for you to look at

thx man!

Steve


Ian @ un4seen

  • Administrator
  • Posts: 20595
Re: missing first and last 33 samples
« Reply #1 on: 8 Dec '17 - 17:38 »
To help identify what/where the problem is, please try writing the file with the pre-compiled CONTEST.EXE example that's included in the BASSenc package (C\BIN folder). If that's fine, you can then try setting a WAV writer on your source handle too (not just the mixer), and see what you get then. If that's fine too, is the mixer definitely not doing any sample rate conversion, ie. the source and mixer have the same sample rate?

BaseHead

  • Posts: 138
Re: missing first and last 33 samples
« Reply #2 on: 13 Dec '17 - 05:24 »
It works fine with the example and I tried the other things and they were all correct.

BUT I did find the source of the issue...It's when BASS_FX is added in the middle of the chain

If I do this I get the 33 samples missing
Code: [Select]
  tempoStream0 = BASS_StreamCreateFile(FALSE, [aPath UTF8String], 0, 0,  BASS_STREAM_DECODE | BASS_STREAM_PRESCAN);
  stream0 = BASS_FX_TempoCreate(tempoStream0, BASS_FX_FREESOURCE | BASS_STREAM_DECODE);

if I just do this skipping BASS_FX then it's fine and I get every single sample in the newly created file
Code: [Select]
  stream0 = BASS_StreamCreateFile(FALSE, [aPath UTF8String], 0, 0,  BASS_STREAM_DECODE | BASS_STREAM_PRESCAN);
is there a flag I'm needing or need to remove somewhere that might help?
In the docs it doesn't have BASS_STREAM_DECODE on the 2nd line but I need it otherwise I'm getting errors
Removing PRESCAN isn't helping either.

thx for any insight man!

Steve

Ian @ un4seen

  • Administrator
  • Posts: 20595
Re: missing first and last 33 samples
« Reply #3 on: 13 Dec '17 - 15:03 »
Ah, I think I may know what's causing that. If so, the tempo stuff was tweaked to fix it but I don't think the BASS_FX update has been released yet. I'll send you an update to try.