Changeset 5bd77e4ba780501cd46ad76c62919681a47984b4
- Timestamp:
- 06/11/06 13:57:05
(2 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1150027025 +0000
- git-parent:
[af23abe4b8908ee9067b412fce5b93918e8750b1]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1150027025 +0000
- Message:
* src/audio_output/intf.c: optimise aout_VolumeGet a bit.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r470b47f |
r5bd77e4 |
|
| 62 | 62 | int __aout_VolumeGet( vlc_object_t * p_object, audio_volume_t * pi_volume ) |
|---|
| 63 | 63 | { |
|---|
| 64 | | int i_volume, i_result = 0; |
|---|
| | 64 | int i_result = 0; |
|---|
| 65 | 65 | aout_instance_t * p_aout = vlc_object_find( p_object, VLC_OBJECT_AOUT, |
|---|
| 66 | 66 | FIND_ANYWHERE ); |
|---|
| 67 | 67 | |
|---|
| 68 | | i_volume = config_GetInt( p_object, "volume" ); |
|---|
| 69 | | if ( pi_volume != NULL ) *pi_volume = (audio_volume_t)i_volume; |
|---|
| 70 | | |
|---|
| 71 | | if ( p_aout == NULL ) return 0; |
|---|
| | 68 | if ( pi_volume == NULL ) return -1; |
|---|
| | 69 | |
|---|
| | 70 | if ( p_aout == NULL ) |
|---|
| | 71 | { |
|---|
| | 72 | *pi_volume = (audio_volume_t)config_GetInt( p_object, "volume" ); |
|---|
| | 73 | return 0; |
|---|
| | 74 | } |
|---|
| 72 | 75 | |
|---|
| 73 | 76 | vlc_mutex_lock( &p_aout->mixer_lock ); |
|---|
| … | … | |
| 75 | 78 | { |
|---|
| 76 | 79 | i_result = p_aout->output.pf_volume_get( p_aout, pi_volume ); |
|---|
| | 80 | } |
|---|
| | 81 | else |
|---|
| | 82 | { |
|---|
| | 83 | *pi_volume = (audio_volume_t)config_GetInt( p_object, "volume" ); |
|---|
| 77 | 84 | } |
|---|
| 78 | 85 | vlc_mutex_unlock( &p_aout->mixer_lock ); |
|---|