diff options
author | Dave Bryant <bryant@rockbox.org> | 2006-03-26 22:54:15 +0000 |
---|---|---|
committer | Dave Bryant <bryant@rockbox.org> | 2006-03-26 22:54:15 +0000 |
commit | 0ad19c7262f987691d04051648e71d6f30892d5f (patch) | |
tree | 5ed040adca51fe7f5fbffb7ae58a50e7f565c111 /apps/codecs/libwavpack/metadata.c | |
parent | d2327dd83d9a88acbc936687a1b823c1b2f573d8 (diff) | |
download | rockbox-0ad19c7262f987691d04051648e71d6f30892d5f.tar.gz rockbox-0ad19c7262f987691d04051648e71d6f30892d5f.zip |
Eliminate references to "long" types for 64-bit compiles; return audio data
in Rockbox standard S3.28 format
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9272 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwavpack/metadata.c')
-rw-r--r-- | apps/codecs/libwavpack/metadata.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/codecs/libwavpack/metadata.c b/apps/codecs/libwavpack/metadata.c index ebc7dcf99d..b7d1e950bf 100644 --- a/apps/codecs/libwavpack/metadata.c +++ b/apps/codecs/libwavpack/metadata.c | |||
@@ -29,12 +29,12 @@ int read_metadata_buff (WavpackContext *wpc, WavpackMetadata *wpmd) | |||
29 | if (!wpc->infile (&tchar, 1)) | 29 | if (!wpc->infile (&tchar, 1)) |
30 | return FALSE; | 30 | return FALSE; |
31 | 31 | ||
32 | wpmd->byte_length += (long) tchar << 9; | 32 | wpmd->byte_length += (int32_t) tchar << 9; |
33 | 33 | ||
34 | if (!wpc->infile (&tchar, 1)) | 34 | if (!wpc->infile (&tchar, 1)) |
35 | return FALSE; | 35 | return FALSE; |
36 | 36 | ||
37 | wpmd->byte_length += (long) tchar << 17; | 37 | wpmd->byte_length += (int32_t) tchar << 17; |
38 | } | 38 | } |
39 | 39 | ||
40 | if (wpmd->id & ID_ODD_SIZE) { | 40 | if (wpmd->id & ID_ODD_SIZE) { |
@@ -42,10 +42,10 @@ int read_metadata_buff (WavpackContext *wpc, WavpackMetadata *wpmd) | |||
42 | wpmd->byte_length--; | 42 | wpmd->byte_length--; |
43 | } | 43 | } |
44 | 44 | ||
45 | if (wpmd->byte_length && wpmd->byte_length <= (long)sizeof (wpc->read_buffer)) { | 45 | if (wpmd->byte_length && wpmd->byte_length <= (int32_t)sizeof (wpc->read_buffer)) { |
46 | ulong bytes_to_read = wpmd->byte_length + (wpmd->byte_length & 1); | 46 | uint32_t bytes_to_read = wpmd->byte_length + (wpmd->byte_length & 1); |
47 | 47 | ||
48 | if (wpc->infile (wpc->read_buffer, bytes_to_read) != (long) bytes_to_read) { | 48 | if (wpc->infile (wpc->read_buffer, bytes_to_read) != (int32_t) bytes_to_read) { |
49 | wpmd->data = NULL; | 49 | wpmd->data = NULL; |
50 | return FALSE; | 50 | return FALSE; |
51 | } | 51 | } |
@@ -108,7 +108,7 @@ int process_metadata (WavpackContext *wpc, WavpackMetadata *wpmd) | |||
108 | 108 | ||
109 | int copy_metadata (WavpackMetadata *wpmd, uchar *buffer_start, uchar *buffer_end) | 109 | int copy_metadata (WavpackMetadata *wpmd, uchar *buffer_start, uchar *buffer_end) |
110 | { | 110 | { |
111 | ulong mdsize = wpmd->byte_length + (wpmd->byte_length & 1); | 111 | uint32_t mdsize = wpmd->byte_length + (wpmd->byte_length & 1); |
112 | WavpackHeader *wphdr = (WavpackHeader *) buffer_start; | 112 | WavpackHeader *wphdr = (WavpackHeader *) buffer_start; |
113 | 113 | ||
114 | if (wpmd->byte_length & 1) | 114 | if (wpmd->byte_length & 1) |