Constructor 링크 복사

예시 코드 초기화하기
// <init>
KNGuide_Voice(voiceCode: KNVoiceCode, voiceDist: KNVoiceDist, guideObj: Any?, data: List<ByteArray>)
// <init>
KNGuide_Voice(voiceCode: KNVoiceCode, voiceDist: KNVoiceDist, guideObj: Any?, data: List<ByteArray>)
코드가 숨겨졌습니다.
표 1 Properties
Name Description Type
duration 음성 길이(단위: 초) var duration: Int
voiceCode 음성 코드 var voiceCode: KNVoiceCode
voiceDist 안내 기준 거리 코드 var voiceDist: KNVoiceDist
guideObj 안내 오브젝트
voiceCodeKNVoiceCode_Turn 또는 KNVoiceCode_Safety일 경우 존재하며 그 외는 null 값을 반환함.
KNVoiceCode_Turn: KNDirection
KNVoiceCode_Safety: KNSafety
KNVoiceCode_CheckingRouteChange, KNVoiceCode_RouteChanged, KNVoiceCode_RouteUnchanged, KNVoiceCode_OutOfRoute: NSString
[경로 요청 사유]
• 경로 이탈: DEVIATION
• 사용자 재탐색: USER
• GPS 오류로 인한 재탐색: GPS_ERROR
• 경유지 추가: WAYPOINT_ADD
• 경유지 삭제: WAYPOINT_DEL
val guideObj: Any?
data 안내 음성 데이터 리스트 var data: List<ByteArray>

함수 링크 복사

음성 볼륨을 설정합니다.

fun setVolume( volume: Float ): Unit

volume
음성 볼륨(범위: 0f~1f)

음성 안내 재생 시 오디오 속성의 사용 용도를 설정합니다. Android AudioAttributes 클래스에 정의된 상수를 사용하며 기본값은 AudioAttributes.USAGE_MEDIA입니다.

fun setUsage( usage: Int )
//예시
setUsage(AudioAttributes.USAGE_MEDIA) 
//예시
setUsage(AudioAttributes.USAGE_MEDIA) 
코드가 숨겨졌습니다.

usage
오디오 사용 용도

현재 설정된 오디오 사용 용도를 가져옵니다.
반환 값은 Android AudioAttributes 클래스에 정의된 상수(예: AudioAttributes.USAGE_MEDIA)이며, 정수값으로 제공합니다.

예시 코드 getUsage
fun setUsage(usage: Int) {
  kn_usage = usage
}

fun getUsage() = kn_usage
fun setUsage(usage: Int) {
  kn_usage = usage
}

fun getUsage() = kn_usage
코드가 숨겨졌습니다.

음성 안내 재생 시 오디오 콘텐츠 타입을 설정합니다. Android AudioAttributes 클래스에 정의된 상수를 사용하며, 기본값은 AudioAttributes.CONTENT_TYPE_MUSIC입니다.

fun setContentType( contentType: Int )

contentType
오디오 콘텐츠 타입

현재 설정된 오디오 콘텐츠 타입을 가져옵니다. 반환 값은 Android AudioAttributes 클래스에 정의된 상수(예: AudioAttributes.CONTENT_TYPE_MUSIC)이며, 정수값으로 제공합니다.

예시 코드 getContentType
fun setContentType(contentType: Int) {
   kn_contentType = contentType
}

fun getContentType() = kn_contentType
fun setContentType(contentType: Int) {
   kn_contentType = contentType
}

fun getContentType() = kn_contentType
코드가 숨겨졌습니다.