2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_SOUNDPOOL_INTERNAL_SOUNDPOOL_H__
18 #define __TIZEN_SOUNDPOOL_INTERNAL_SOUNDPOOL_H__
20 #include "sound_pool_type.h"
21 #include "sound_pool_private.h"
31 typedef struct stream_cb_manager_s stream_cb_manager_t;
32 typedef struct stream_priority_manager_s stream_priority_manager_t;
35 * @brief Sound Pool pool type.
39 typedef struct sound_pool_s {
40 ALCcontext *al_context;
47 guint max_stream_index;
48 sound_pool_state_e state;
51 sound_pool_state_change_cb callback;
55 stream_cb_manager_t *cbmgr;
56 stream_priority_manager_t *mgr_priority;
59 /* Max amount of sound pools which could be created. */
60 #define SOUND_POOL_MAX_POOLS_AMOUNT 32U
62 sound_pool_error_e _sound_pool_create(size_t max_streams, sound_pool_t **pool);
64 sound_pool_error_e _sound_pool_destroy(sound_pool_t *pool);
66 sound_pool_error_e _sound_pool_activate(sound_pool_t *pool);
68 sound_pool_error_e _sound_pool_deactivate(sound_pool_t *pool);
70 sound_pool_error_e _sound_pool_get_state(sound_pool_t *pool, sound_pool_state_e *state);
72 sound_pool_error_e _sound_pool_set_volume(sound_pool_t *pool, float volume);
74 sound_pool_error_e _sound_pool_get_volume(sound_pool_t *pool, float *volume);
76 sound_pool_error_e _sound_pool_set_callback(sound_pool_t *pool,
77 sound_pool_state_change_cb callback, void *data);
79 sound_pool_error_e _sound_pool_unset_callback(sound_pool_t *pool);
83 #endif /* __cplusplus */
85 #endif /* __TIZEN_SOUNDPOOL_INTERNAL_SOUNDPOOL_H__ */