VMINT drv11;
VMCHAR path[30]={0};
VMWCHAR wpath[30]={0};
drv11=vm_get_removable_driver();
if(drv11<0)
drv11=vm_get_system_driver();
sprintf(path,"%c:\\vre\\Arai.mp3",drv11);
vm_ascii_to_ucs2(wpath,510,path);
audio_info.audio_handle=vm_audio_play_file_ex(wpath,audio_info.current_play_time,VM_DEVICE_SPEAKER2,audio_callback);
// audio_info.audio_handle=vm_audio_play_file(vm_ucs2_string(path),audio_callback);
if (VM_AUDIO_SUCCEED ==audio_info.audio_handle)
{
audio_info.audio_timer = vm_create_timer_ex(100, timer_proc);
audio_info.audio_state = audio_PLAYING;
sprintf(g_info_text, "Playing");
}
else
{
sprintf(g_info_text, "Play failed");
}
用vm_audio_play_file就可以返回VM_AUDIO_SUCCEED
而用vm_audio_play_file_ex就返回VM_AUDIO_FAILED
请好心人 指点一下 !!!!