| 
									
										
										
										
											2018-05-22 11:58:45 +08:00
										 |  |  | #include "..\e2dcustom.h"
 | 
					
						
							|  |  |  | #include "..\e2dbase.h"
 | 
					
						
							|  |  |  | #include "..\e2dtool.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-01 23:39:16 +08:00
										 |  |  | e2d::VoiceCallback::VoiceCallback() | 
					
						
							| 
									
										
										
										
											2018-05-22 11:58:45 +08:00
										 |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | e2d::VoiceCallback::~VoiceCallback() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void e2d::VoiceCallback::OnLoopEnd(void * pBufferContext) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (_loopEndFunc) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		_loopEndFunc(); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void e2d::VoiceCallback::OnStreamEnd() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (_streamEndFunc) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		_streamEndFunc(); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void e2d::VoiceCallback::OnBufferEnd(void * pBufferContext) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	if (_loopEndFunc) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		_loopEndFunc(); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-23 16:37:51 +08:00
										 |  |  | void e2d::VoiceCallback::SetFuncOnStreamEnd(const Function & func) | 
					
						
							| 
									
										
										
										
											2018-05-22 11:58:45 +08:00
										 |  |  | { | 
					
						
							|  |  |  | 	_streamEndFunc = func; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-08-23 16:37:51 +08:00
										 |  |  | void e2d::VoiceCallback::SetFuncOnLoopEnd(const Function & func) | 
					
						
							| 
									
										
										
										
											2018-05-22 11:58:45 +08:00
										 |  |  | { | 
					
						
							|  |  |  | 	_loopEndFunc = func; | 
					
						
							| 
									
										
										
										
											2018-09-01 23:39:16 +08:00
										 |  |  | } |