| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
Hello I am developing a DirectShow filter for creating an encoder.
My problem is that the encoders nature is such that it should receive an sound buffer in big-endian format, but
what I receive is in little endian format. So I have a sound buffer, which before passing downstream I have
to convert to big-endian. What I have done is as follows: // lAccumulatedData is the sound sample size. for (long l = 0; l < lAccumulatedData; l += 2) { WORD
wSample = MAKEWORD (*(pSoundData + l), *(pSoundData + l + 1)); BYTE
by1 = LOBYTE (wSample); BYTE
by2 = HIBYTE (wSample); *(pSoundData
+ l) = by2; *(pSoundData
+ l + 1) = by1; } It works but, I have to run this loop each time I receive
an audio sample, which slows down the encoding process. What according to u’ll is
the optimized way of doing it ? Please help Bhavna |
_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-API mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quicktime-api/email@hidden This email sent to email@hidden
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.