search for: tempsourc

Displaying 3 results from an estimated 3 matches for "tempsourc".

Did you mean: tempsource
2005 Sep 30
2
Reg. FLAC decoding
...while (1) { /* If the 1MB buffer becomes., full we'll have to send it out * to the chip and create a new buffer */ if ((pThis->m_Position + (BytesPerSample * 2)) < 0x100000) { short * TempDest = (short*)(&pThis->m_TempBuffer[pThis->m_Position]); short * TempSource = (short *)&LChannel[LPos]; *TempDest = *TempSource; TempSource = (short *)&RChannel[RPos]; TempDest ++; *TempDest = *TempSource; LPos = LPos + BytesPerSample; RPos = RPos + BytesPerSample; pThis->m_Position = pThis->m_Position + (BytesPerSample<<1);...
2005 Sep 30
0
Re: Reg. FLAC decoding
...#39;re treating the samples in buffer[] as packed 16 bit numbers. but all samples in buffer[] are 32-bit signed integers in host order, regardless of the bits-per-sample of the frame. so to get them down to shorts (assuming they'll fit), do like: FLAC__int32 * LChannel = buffer[0]; short TempSource = (short)LChannel[LPos]; instead of LChannel = (unsigned char *)buffer[0]; short * TempSource = (short *)&LChannel[LPos]; etc. also, it's probably faster and safer to get the #channels, bits-per-sample, and sample rate from the the frame header itself, e.g. channels = frame->...
2005 Oct 06
2
Re: Reg. FLAC decoding
...-09-30 at 23:14, Josh Coalson wrote: > but all samples in buffer[] are 32-bit signed integers in host > order, regardless of the bits-per-sample of the frame. so to get > them down to shorts (assuming they'll fit), do like: > > FLAC__int32 * LChannel = buffer[0]; > short TempSource = (short)LChannel[LPos]; > > instead of > > LChannel = (unsigned char *)buffer[0]; > short * TempSource = (short *)&LChannel[LPos]; > let me know if this works or if you have other questions. I tried this., but still i dont get the proper output. I'm still debuggi...