Endian fix?
parent
349a3b0ba2
commit
895bb0c760
|
@ -1,3 +1,11 @@
|
||||||
|
0.05 alpha 4
|
||||||
|
------------
|
||||||
|
Volume slider now gravitates to 100%, in the middle.
|
||||||
|
|
||||||
|
0.05 alpha 3
|
||||||
|
------------
|
||||||
|
Universal binary
|
||||||
|
|
||||||
0.05 alpha 2
|
0.05 alpha 2
|
||||||
------------
|
------------
|
||||||
Fixed dock menu connections, and menu connections for play, stop, next, and previous.
|
Fixed dock menu connections, and menu connections for play, stop, next, and previous.
|
||||||
|
|
|
@ -159,6 +159,14 @@
|
||||||
{
|
{
|
||||||
currentVolume = (float)[sender doubleValue];
|
currentVolume = (float)[sender doubleValue];
|
||||||
|
|
||||||
|
//gravitates at the halfway mark
|
||||||
|
float v = ([sender frame].size.width/[sender maxValue])*(currentVolume-([sender maxValue]/2.0));
|
||||||
|
if (fabs(v) < 10.0)
|
||||||
|
{
|
||||||
|
currentVolume = [sender maxValue]/2.0;
|
||||||
|
[sender setDoubleValue:currentVolume];
|
||||||
|
}
|
||||||
|
|
||||||
[soundController setVolume:currentVolume];
|
[soundController setVolume:currentVolume];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,11 @@ void ErrorProc(const FLAC__FileDecoder *decoder, FLAC__StreamDecoderErrorStatus
|
||||||
|
|
||||||
FLAC__file_decoder_process_until_end_of_metadata(decoder);
|
FLAC__file_decoder_process_until_end_of_metadata(decoder);
|
||||||
|
|
||||||
|
#ifdef __BIG_ENDIAN__
|
||||||
isBigEndian = YES;
|
isBigEndian = YES;
|
||||||
|
#else
|
||||||
|
isBigEndian = NO;
|
||||||
|
#endif
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
// DBLog(@"Woot: %i", n);
|
// DBLog(@"Woot: %i", n);
|
||||||
DecMPA_OutputFormat outputFormat;
|
DecMPA_OutputFormat outputFormat;
|
||||||
err = DecMPA_GetOutputFormat(decoder, &outputFormat);
|
err = DecMPA_GetOutputFormat(decoder, &outputFormat);
|
||||||
|
|
||||||
if (err != DECMPA_OK)
|
if (err != DECMPA_OK)
|
||||||
return NO;
|
return NO;
|
||||||
|
|
||||||
|
@ -35,7 +36,11 @@
|
||||||
channels = outputFormat.nChannels;
|
channels = outputFormat.nChannels;
|
||||||
bitsPerSample = 16;
|
bitsPerSample = 16;
|
||||||
|
|
||||||
|
#ifdef __BIG_ENDIAN__
|
||||||
isBigEndian = YES;
|
isBigEndian = YES;
|
||||||
|
#else
|
||||||
|
isBigEndian = NO;
|
||||||
|
#endif
|
||||||
|
|
||||||
long duration;
|
long duration;
|
||||||
DecMPA_GetDuration(decoder, &duration);
|
DecMPA_GetDuration(decoder, &duration);
|
||||||
|
@ -83,13 +88,13 @@
|
||||||
|
|
||||||
DecMPA_Decode(decoder, &((char *)buf)[total], size - total, &numread);
|
DecMPA_Decode(decoder, &((char *)buf)[total], size - total, &numread);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
/* int n;
|
int n;
|
||||||
for (n = 0; n < total/2; n++)
|
for (n = 0; n < total/2; n++)
|
||||||
{
|
{
|
||||||
((UInt16 *)buf)[n] = CFSwapInt16LittleToHost(((UInt16 *)buf)[n]);
|
((UInt16 *)buf)[n] = CFSwapInt16BigToHost(((UInt16 *)buf)[n]);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
currentPosition += total;
|
currentPosition += total;
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,11 @@ BOOL CanSeekProc(void *data)
|
||||||
}
|
}
|
||||||
// DBLog(@"Ok to go...");
|
// DBLog(@"Ok to go...");
|
||||||
|
|
||||||
|
#ifdef __BIG_ENDIAN__
|
||||||
isBigEndian = YES;
|
isBigEndian = YES;
|
||||||
|
#else
|
||||||
|
isBigEndian = NO;
|
||||||
|
#endif
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue