|
From: | John Clark |
Subject: | Re: [Discuss-gnuradio] No audio on os x reading .dat files |
Date: | Thu, 17 Aug 2006 16:58:31 -0700 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8.0.4) Gecko/20060516 SeaMonkey/1.0.2 |
Josh Jennings schrieb:
As far as I know, one would need to make an endian sniffer which would either read a header in the file or decide on its own how to read/convert the file.
No just add 'intelToHost_XX()' or 'HostToIntel' functions for reading data, or writing data. Then a host sensitive reader would have these defined appropriately for the endianness of
the host. This is done all the time throughout the networking code.Perhaps to make it more efficient, 'Intel_Array_To_Host', or 'Host_Array_To_Intel' would
allow for converting chunks of data from the file format to the host format.Obviously if the files are never going to be seen outside the particular host, it doesn't matter.
The alternative would be to format data al la a 'IFF' chunk... if there is a float or double
format for such... John Clark
[Prev in Thread] | Current Thread | [Next in Thread] |