コード例 #1
0
ファイル: mci.c プロジェクト: jprothwell/sc-fix
UINT32 MCI_AudioPlay (INT32 OutputPath,HANDLE fileHandle, mci_type_enum fielType,MCI_AUDIO_PLAY_CALLBACK_T callback,INT32 PlayProgress)   //  MCI_MEDIA_PLAY_REQ,         
{
	INT32 result;
	diag_printf( "***********OutputPath:%d*****file_name_p:%d, PlayProgress :%d  ",OutputPath,fileHandle,PlayProgress);
	g_mciAudioFinishedCallback=callback;

    csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_104M);

	result = LILY_AudioPlay(OutputPath, fileHandle,fielType, PlayProgress);
    if (result != MCI_ERR_NO)
    {
        csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_32K);
    }

    return result;
}
コード例 #2
0
ファイル: mci.c プロジェクト: jprothwell/sc-fix
UINT32 MCI_AudioStop(VOID)
{
    INT32 result;
    result = LILY_AudioStop();
    csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_32K);
    return result;
}
コード例 #3
0
ファイル: mci.c プロジェクト: BarryChen/RDA
UINT32 MCI_PlayBTStream (bt_a2dp_audio_cap_struct *audio_cap)
{
	INT32 result=0;
       mci_type_enum mediaType;
       
       hal_HstSendEvent(SYS_EVENT,0x10250010);
       hal_HstSendEvent(SYS_EVENT,audio_cap);
       hal_HstSendEvent(SYS_EVENT,audio_cap->codec_type);

       csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_104M);
       if(audio_cap->codec_type == AVDTP_MEDIA_CODEC_SBC)
            mediaType = MCI_TYPE_SBC;
       else if(audio_cap->codec_type == AVDTP_MEDIA_CODEC_MPEG1_2_AUDIO )
            mediaType = MCI_TYPE_DAF;
       else if(audio_cap->codec_type == AVDTP_MEDIA_CODEC_MPEG2_4_AAC)
	   	 mediaType = MCI_TYPE_AAC;
       else
            return MCI_ERR_BAD_FORMAT;
       
	g_mciAudioFinishedCallback=NULL;
       MCI_BTAudioCap = audio_cap;
       MCI_Play_BTStream = 1;
       MCI_Play_Stream_Buffer = 0;
	result     = LILY_AudioPlay(0, 0,mediaType, 0);
    hal_HstSendEvent(SYS_EVENT,0x10250100);
    hal_HstSendEvent(SYS_EVENT,result);
    return result;
}
コード例 #4
0
ファイル: mci.c プロジェクト: jprothwell/sc-fix
UINT32 MCI_AudioResume(HANDLE fileHandle)
{
    INT32 result;
    diag_printf( "##################MCI_AudioResume############################");
    csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_104M);
    result = LILY_AudioResume( fileHandle );
    return result;
}
コード例 #5
0
ファイル: mci.c プロジェクト: jprothwell/sc-fix
VOID MCI_AudioRecordFinished(MCI_ERR_T result)
{
    csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_32K);
    if (g_mciAudioRecordFinishedCallback)
    {
        (*g_mciAudioRecordFinishedCallback)(result);
    }
}
コード例 #6
0
ファイル: mci.c プロジェクト: BarryChen/RDA
UINT32 MCI_AudioStop(VOID)
{
    INT32 result;
       if((audio_mode >=MCI_TYPE_3GP)&&(audio_mode <=MCI_TYPE_MJPG))
        {
          result = MCI_VideoStop();
          result = MCI_VideoClose();
        }
      else
        result = LILY_AudioStop();
    MCI_Play_Stream_Buffer = 0;
#ifdef BT_SUPPORT
    MCI_Play_BTStream = 0;
#endif    
    
    csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_32K);
    return result;
}
コード例 #7
0
ファイル: mci.c プロジェクト: BarryChen/RDA
UINT32 MCI_AudioPlay (INT32 OutputPath,HANDLE fileHandle, mci_type_enum fielType,MCI_AUDIO_PLAY_CALLBACK_T callback,INT32 PlayProgress)   //  MCI_MEDIA_PLAY_REQ,         
{
	INT32 result=MCI_ERR_NO;
	diag_printf( "***********OutputPath:%d*****file_name_p:%d, PlayProgress :%d ,fielType :%d ",OutputPath,fileHandle,PlayProgress,fielType);
	g_mciAudioFinishedCallback=callback;
    MCI_Play_Stream_Buffer = 0;
#ifdef BT_SUPPORT
        MCI_Play_BTStream = 0;
#endif    
    hal_HstSendEvent(SYS_EVENT, 0x20131203);
    csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_104M);

     audio_mode = fielType;

#ifdef VIDEO_PLAYER_SUPPORT
      if((audio_mode >=MCI_TYPE_3GP)&&(audio_mode <=MCI_TYPE_MJPG))
        {

          if(PlayProgress ==0)
            {
            result=  MCI_VideoOpenFile(2,2, fileHandle, 0, 0, fielType, MCI_vid_play_finish_ind,NULL);
			
	    if (result !=ISOM_ERR_OK)   
	    	{
	        result = MCI_VideoClose();
                 return MCI_ERR_ERROR;
	    	}
                  MCI_VideoPlay (0,0)  ;
            }
          else
            {
        	 INT16 img_width = 0;
        	 INT16 img_height = 0;
        	 INT32 totaltime = 0;

                UINT16  aud_channel;
                UINT16  aud_sample_rate;
                UINT16  track;
               UINT16  audio_type;
              INT64  current_Progress;
	            
              result=MCI_VideoOpenFile(2,2, fileHandle, 0, 0, fielType, MCI_vid_play_finish_ind,NULL);
               audio_type = MCI_VideoGetInfo(&img_width,&img_height, &totaltime,&aud_channel,&aud_sample_rate,& track);

              current_Progress= (((INT64)PlayProgress*(INT64)totaltime)/10000);
              
             MCI_VideoSeek (current_Progress, SEEK_TIME_MODE_ABSOLUTE, 0, 0) ; 
              MCI_VideoPlay (0,0)  ;
            }
             
        }
    else
#endif
	result = LILY_AudioPlay(OutputPath, fileHandle,fielType, PlayProgress);
    if (result != MCI_ERR_NO)
    {
        csw_SetResourceActivity(CSW_LP_RESOURCE_AUDIO_PLAYER, CSW_SYS_FREQ_32K);
    }

    return result;
}