Commit ea32bd20 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed white spacing errors introduced in previous commit...

macosx: fixed white spacing errors introduced in previous commit (ff8183c0)
parent ff8183c0
This diff is collapsed.
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
- (id)performDefaultImplementation { - (id)performDefaultImplementation {
NSString *o_command = [[self commandDescription] commandName]; NSString *o_command = [[self commandDescription] commandName];
NSString *o_parameter = [self directParameter]; NSString *o_parameter = [self directParameter];
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
playlist_t * p_playlist = pl_Get( p_intf ); playlist_t * p_playlist = pl_Get( p_intf );
if( p_playlist == NULL ) if( p_playlist == NULL )
...@@ -128,64 +128,64 @@ ...@@ -128,64 +128,64 @@
[[VLCCoreInteraction sharedInstance] volumeDown]; [[VLCCoreInteraction sharedInstance] volumeDown];
} }
else if ( [o_command isEqualToString:@"stepForward"] ) else if ( [o_command isEqualToString:@"stepForward"] )
{ {
//default: forwardShort //default: forwardShort
if (o_parameter) if (o_parameter)
{ {
int i_parameter = [o_parameter intValue]; int i_parameter = [o_parameter intValue];
switch (i_parameter) switch (i_parameter)
{ {
case 1: case 1:
[[VLCCoreInteraction sharedInstance] forwardExtraShort]; [[VLCCoreInteraction sharedInstance] forwardExtraShort];
break; break;
case 2: case 2:
[[VLCCoreInteraction sharedInstance] forwardShort]; [[VLCCoreInteraction sharedInstance] forwardShort];
break; break;
case 3: case 3:
[[VLCCoreInteraction sharedInstance] forwardMedium]; [[VLCCoreInteraction sharedInstance] forwardMedium];
break; break;
case 4: case 4:
[[VLCCoreInteraction sharedInstance] forwardLong]; [[VLCCoreInteraction sharedInstance] forwardLong];
break; break;
default: default:
[[VLCCoreInteraction sharedInstance] forwardShort]; [[VLCCoreInteraction sharedInstance] forwardShort];
break; break;
} }
} }
else else
{ {
[[VLCCoreInteraction sharedInstance] forwardShort]; [[VLCCoreInteraction sharedInstance] forwardShort];
} }
} }
else if ( [o_command isEqualToString:@"stepBackward"] ) else if ( [o_command isEqualToString:@"stepBackward"] )
{ {
//default: backwardShort //default: backwardShort
if (o_parameter) if (o_parameter)
{ {
int i_parameter = [o_parameter intValue]; int i_parameter = [o_parameter intValue];
switch (i_parameter) switch (i_parameter)
{ {
case 1: case 1:
[[VLCCoreInteraction sharedInstance] backwardExtraShort]; [[VLCCoreInteraction sharedInstance] backwardExtraShort];
break; break;
case 2: case 2:
[[VLCCoreInteraction sharedInstance] backwardShort]; [[VLCCoreInteraction sharedInstance] backwardShort];
break; break;
case 3: case 3:
[[VLCCoreInteraction sharedInstance] backwardMedium]; [[VLCCoreInteraction sharedInstance] backwardMedium];
break; break;
case 4: case 4:
[[VLCCoreInteraction sharedInstance] backwardLong]; [[VLCCoreInteraction sharedInstance] backwardLong];
break; break;
default: default:
[[VLCCoreInteraction sharedInstance] backwardShort]; [[VLCCoreInteraction sharedInstance] backwardShort];
break; break;
} }
} }
else else
{ {
[[VLCCoreInteraction sharedInstance] backwardShort]; [[VLCCoreInteraction sharedInstance] backwardShort];
} }
} }
return nil; return nil;
} }
...@@ -219,58 +219,57 @@ ...@@ -219,58 +219,57 @@
} }
- (BOOL) muted { - (BOOL) muted {
return [[VLCCoreInteraction sharedInstance] isMuted]; return [[VLCCoreInteraction sharedInstance] isMuted];
} }
- (BOOL) playing { - (BOOL) playing {
return [[VLCCoreInteraction sharedInstance] isPlaying]; return [[VLCCoreInteraction sharedInstance] isPlaying];
} }
- (double) audioVolume { - (double) audioVolume {
return ( (double)[[VLCCoreInteraction sharedInstance] volume] / (double)AOUT_VOLUME_DEFAULT ); return ( (double)[[VLCCoreInteraction sharedInstance] volume] / (double)AOUT_VOLUME_DEFAULT );
} }
- (void) setAudioVolume: (double) d_audioVolume { - (void) setAudioVolume: (double) d_audioVolume {
//1 = 100%, 4 = 400%; 0 <= d_audioVolume <= 4 //1 = 100%, 4 = 400%; 0 <= d_audioVolume <= 4
//0-1024 (but AOUT_VOLUME_MAX == 512)??? //0-1024 (but AOUT_VOLUME_MAX == 512)???
//AOUT_VOLUME_DEFAULT = 256 = 100% //AOUT_VOLUME_DEFAULT = 256 = 100%
//somehow [[VLCCoreInteraction sharedInstance] setVolume:i_parameter] has 0-32 steps with 32 as stepWidth (0 - 1024) //somehow [[VLCCoreInteraction sharedInstance] setVolume:i_parameter] has 0-32 steps with 32 as stepWidth (0 - 1024)
if (d_audioVolume < 0) if (d_audioVolume < 0)
d_audioVolume = 0; d_audioVolume = 0;
if (d_audioVolume > 4)
d_audioVolume = 4;
intf_thread_t * p_intf = VLCIntf;
playlist_t * p_playlist = pl_Get( VLCIntf );
int i_volume_step = config_GetInt( VLCIntf->p_libvlc, "volume-step" );
int i_parameter = (int) ( d_audioVolume * i_volume_step / 4 ); if (d_audioVolume > 4)
[[VLCCoreInteraction sharedInstance] setVolume:i_parameter]; d_audioVolume = 4;
intf_thread_t * p_intf = VLCIntf;
playlist_t * p_playlist = pl_Get( VLCIntf );
int i_volume_step = config_GetInt( VLCIntf->p_libvlc, "volume-step" );
int i_parameter = (int) ( d_audioVolume * i_volume_step / 4 );
[[VLCCoreInteraction sharedInstance] setVolume:i_parameter];
} }
- (int) currentTime { - (int) currentTime {
return [[VLCCoreInteraction sharedInstance] currentTime]; return [[VLCCoreInteraction sharedInstance] currentTime];
} }
- (void) setCurrentTime: (int) i_currentTime { - (void) setCurrentTime: (int) i_currentTime {
if (i_currentTime) { if (i_currentTime)
[[VLCCoreInteraction sharedInstance] setCurrentTime:i_currentTime]; [[VLCCoreInteraction sharedInstance] setCurrentTime:i_currentTime];
}
} }
#pragma mark - #pragma mark -
//TODO:whenever VLC should implement NSDocument, the methods below should move or be additionaly implemented in the NSDocument category //TODO:whenever VLC should implement NSDocument, the methods below should move or be additionaly implemented in the NSDocument category
- (int) durationOfCurrentItem { - (int) durationOfCurrentItem {
return [[VLCCoreInteraction sharedInstance] durationOfCurrentPlaylistItem]; return [[VLCCoreInteraction sharedInstance] durationOfCurrentPlaylistItem];
} }
- (NSString*) pathOfCurrentItem { - (NSString*) pathOfCurrentItem {
return [[[VLCCoreInteraction sharedInstance] URLOfCurrentPlaylistItem] path]; return [[[VLCCoreInteraction sharedInstance] URLOfCurrentPlaylistItem] path];
} }
- (NSString*) nameOfCurrentItem { - (NSString*) nameOfCurrentItem {
return [[VLCCoreInteraction sharedInstance] nameOfCurrentPlaylistItem]; return [[VLCCoreInteraction sharedInstance] nameOfCurrentPlaylistItem];
} }
@end @end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment