[wdmaudiodev] Avstream capture - Sync issue with Cool Edit Pro 2.0

  • From: wade <wdawson61@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 15 Aug 2003 12:32:43 -0700 (PDT)

Hi All:

I have a capture-only AvStreams driver and having a problem with sync on Cool 
Edit Pro. I capture a stream in sound forge and it plays back properly in Sound 
Forge Playback and capture both work fine on Sound Forge but  CEP 2.0 playback 
tempo varies and is glitchy.  I am filling the duration and time members of the 
KSStream Header as follows:

#define BITS_PER_BYTE    8
#define NANOSECONDS    10000000


 PWAVEFORMATPCMEX waveFormatPcmeEx = (PWAVEFORMATPCMEX)(pin->ConnectionFormat + 
1);
  ULONG channels = waveFormatPcmeEx->Format.nChannels;
  ULONG hz = waveFormatPcmeEx->Format.nSamplesPerSec;
  ULONG bps = (waveFormatPcmeEx->Format.wBitsPerSample)? 
waveFormatPcmeEx->Format.wBitsPerSample : 
waveFormatPcmeEx->Samples.wValidBitsPerSample;


  StreamPointer -> StreamHeader ->OptionsFlags = 
(KSSTREAM_HEADER_OPTIONSF_DURATIONVALID | KSSTREAM_HEADER_OPTIONSF_TIMEVALID);
  StreamPointer -> StreamHeader->PresentationTime.Numerator = BITS_PER_BYTE * 
NANOSECONDS;
  StreamPointer -> StreamHeader->PresentationTime.Denominator = bps * channels 
* hz;
  StreamPointer -> StreamHeader->PresentationTime.Time = Pin->streamOffset;
  StreamPointer -> StreamHeader->Duration = StreamPointer -> StreamHeader -> 
DataUsed;


Any help appreciated.


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Other related posts:

  • » [wdmaudiodev] Avstream capture - Sync issue with Cool Edit Pro 2.0