2 * Copyright (c) 2011 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.
20 #include <wav_player.h>
26 static GMainLoop *g_mainloop = NULL;
27 static GThread *event_thread;
29 gpointer GmainThread(gpointer data){
30 g_mainloop = g_main_loop_new (NULL, 0);
31 g_main_loop_run (g_mainloop);
36 void _player_stop_cb(int id, void *user_data){
37 printf("complete id = %d,%d\n", id, (int)user_data);
46 for(i =0 ; i < 100; i++){
47 ret = wav_player_start("test.wav", SOUND_TYPE_MEDIA, _player_stop_cb,(void*)i, &id);
48 printf("wav_player_start(%d)(id=%d) ret = %d\n",i,id, ret);
57 int main(int argc, char**argv)
59 if( !g_thread_supported() )
65 event_thread = g_thread_create(GmainThread, NULL, 1, &gerr);