콘텐츠로 이동

Class Clip

package org.kwis.msp.media

java.lang.Object
|
+--org.kwis.msp.media.Clip

extends Object:

이 클래스는 Player에 의해 재생되는 클립을 구현한다.

  • protected  byte[] buf
  • protected  int bufLength
  • protected  int[] duration
  • protected  int eventParm
  • protected  int front
  • protected  int[] hiFreq
  • protected  boolean isNotifyWM
  • protected  int left
  • protected  int[] lowFreq
  • protected  int magicID
  • protected  int playerID
  • protected  int prgID
  • protected  int rear
  • protected  int[] tone
  • protected  int waterMarkLength
  • Clip ( String type) 특정 타입의 클립을 생성한다.
  • Clip ( String type, byte[] buf) 이미 데이타가 저장되어 있는 매개변수를 받아들여 클립을 생성한다.
  • Clip ( String type, int bufSize) 특정 타입의 CLIP을 생성한다.
  • Clip ( String type, String resourceName)
  • protected  void atomicGetUpdate (int getSize)
  • protected  void atomicPutUpdate (int putSize)
  • int availableDataSize () — 클립에서 이용가능한 데이타 크기(클립 내부버퍼 크기가 아님)
  • void clearData () — 클립내의 이용가능한 데이타를 모두 버린다.
  • protected static int control (int playerID, int cmd, Object buf1, Object buf2) — HAL단의 MH_mdaControl()에 연결되는 함수이다.
  • int getData (byte[] buf, int off, int len) — 클립에서 buf로 미디어 데이타를 복사한다.
  • protected  int getPlayerID ( String type)
  • String getType () — 클립의 Type을 구한다.
  • int getVolume () — 클립 재생기의 볼륨을 읽어온다.
  • protected  int mediaFreeze ()
  • protected  int mediaReadData ()
  • protected  int mediaWriteData ()
  • protected  boolean playStart (boolean repeat) — Player.play(Clip clip, boolean repeat)메쏘드안에서 실제 재생함수를 부르기전 repeat값을 매개변수로 불러준다.
  • boolean playUpdate (int event, int parm) — 클립 재생시 상태변화를 알린다.
  • int putData (byte[] buf, int off, int len) — 클립에 미디어 데이타를 복사한다.
  • protected  boolean recordStart () — Player.record(Clip clip)메쏘드안에서 실제 record함수를 부르기전 불러준다.
  • boolean setBuffer (byte[] buf, int dataSize) — 클립의 내부버퍼을 설정한다.
  • void setListener ( PlayListener listener) — 클립 재생시 상태변화를 알려줄 listener를 등록한다.
  • boolean setPosition (int ms) — 재생을 시작할 위치를 설정한다.
  • boolean setVolume (int level) — 클립 재생기의 볼륨을 설정한다.
protected int prgID
protected int playerID
protected byte[] buf
protected int[] tone
protected int[] hiFreq
protected int[] lowFreq
protected int[] duration
protected int bufLength
protected int left
protected int front
protected int rear
protected int waterMarkLength
protected boolean isNotifyWM
protected int magicID
protected int eventParm
public Clip(String type,
int bufSize)

Parameters:

  • bufSize - 클립내부에 생성될 버퍼의 크기(바이트 단위)
public Clip(String type)

Parameters:

  • type - 리소스 타입
public Clip(String type,
byte[] buf)

Parameters:

  • buf - 데이타가 들어 있는 버퍼
public Clip(String type,
String resourceName)
protected int getPlayerID(String type)
protected void atomicPutUpdate(int putSize)
protected int mediaWriteData()
protected void atomicGetUpdate(int getSize)
protected int mediaReadData()
protected int mediaFreeze()
protected static int control(int playerID,
int cmd,
Object buf1,
Object buf2)
  • HAL단의 MH_mdaControl()에 연결되는 함수이다. 함수의 의미는 이통사나 제조사에 따른다.
public boolean setBuffer(byte[] buf,
int dataSize)

Parameters:

  • dataSize - 버퍼안에 들어있는 데이타 크기

Returns:

  • true : 버퍼 설정 성공

false : 이미 버퍼가 설정되어 있음

public int putData(byte[] buf,
int off,
int len)

Parameters:

  • len - 복사할 크기

Returns:

  • 복사된 크기
public int getData(byte[] buf,
int off,
int len)

Parameters:

  • len - 복사될 크기

Returns:

  • 복사된 크기
public int availableDataSize()

Returns:

  • 이용가능한 데이타 크기
public void clearData()
  • 클립내의 이용가능한 데이타를 모두 버린다.
public String getType()

Returns:

  • Type 문자열
public boolean setPosition(int ms)

Parameters:

  • ms - 클립 재생을 시작할 시작 시점(milli second)

Returns:

  • ture : 성공

false : 설정 실패

public final int getVolume()

Returns:

  • 성공 : 볼륨 값(0-100사이의 볼륨값)
public final boolean setVolume(int level)

Parameters:

  • level - 볼륨값
public void setListener(PlayListener listener)

Parameters:

  • listener - 새로운 listener, 만일 null 이면 기존 것을 제거함
protected boolean playStart(boolean repeat)

Parameters:

  • repeat - Player.play()에 전달된 repeat값
protected boolean recordStart()

Returns:

  • true : Player.record()함수 수행이 정상적으로 수행됨

false : Player.record()함수가 더이상 수행되지 않고 false로 반환됨

public boolean playUpdate(int event,
int parm)

Parameters:

  • parm - 각 event에 추가 전달값이 있을 경우 사용## 생성자 상세
public Clip(String type,
int bufSize)

Parameters:

  • bufSize - 클립내부에 생성될 버퍼의 크기(바이트 단위)
public Clip(String type)

Parameters:

  • type - 리소스 타입
public Clip(String type,
byte[] buf)

Parameters:

  • buf - 데이타가 들어 있는 버퍼
public Clip(String type,
String resourceName)
protected int getPlayerID(String type)
protected void atomicPutUpdate(int putSize)
protected int mediaWriteData()
protected void atomicGetUpdate(int getSize)
protected int mediaReadData()
protected int mediaFreeze()
protected static int control(int playerID,
int cmd,
Object buf1,
Object buf2)
  • HAL단의 MH_mdaControl()에 연결되는 함수이다. 함수의 의미는 이통사나 제조사에 따른다.
public boolean setBuffer(byte[] buf,
int dataSize)

Parameters:

  • dataSize - 버퍼안에 들어있는 데이타 크기

Returns:

  • true : 버퍼 설정 성공

false : 이미 버퍼가 설정되어 있음

public int putData(byte[] buf,
int off,
int len)

Parameters:

  • len - 복사할 크기

Returns:

  • 복사된 크기
public int getData(byte[] buf,
int off,
int len)

Parameters:

  • len - 복사될 크기

Returns:

  • 복사된 크기
public int availableDataSize()

Returns:

  • 이용가능한 데이타 크기
public void clearData()
  • 클립내의 이용가능한 데이타를 모두 버린다.
public String getType()

Returns:

  • Type 문자열
public boolean setPosition(int ms)

Parameters:

  • ms - 클립 재생을 시작할 시작 시점(milli second)

Returns:

  • ture : 성공

false : 설정 실패

public final int getVolume()

Returns:

  • 성공 : 볼륨 값(0-100사이의 볼륨값)
public final boolean setVolume(int level)

Parameters:

  • level - 볼륨값
public void setListener(PlayListener listener)

Parameters:

  • listener - 새로운 listener, 만일 null 이면 기존 것을 제거함
protected boolean playStart(boolean repeat)

Parameters:

  • repeat - Player.play()에 전달된 repeat값
protected boolean recordStart()

Returns:

  • true : Player.record()함수 수행이 정상적으로 수행됨

false : Player.record()함수가 더이상 수행되지 않고 false로 반환됨

public boolean playUpdate(int event,
int parm)

Parameters:

  • parm - 각 event에 추가 전달값이 있을 경우 사용## 메서드 상세
protected int getPlayerID(String type)
protected void atomicPutUpdate(int putSize)
protected int mediaWriteData()
protected void atomicGetUpdate(int getSize)
protected int mediaReadData()
protected int mediaFreeze()
protected static int control(int playerID,
int cmd,
Object buf1,
Object buf2)
  • HAL단의 MH_mdaControl()에 연결되는 함수이다. 함수의 의미는 이통사나 제조사에 따른다.
public boolean setBuffer(byte[] buf,
int dataSize)

Parameters:

  • dataSize - 버퍼안에 들어있는 데이타 크기

Returns:

  • true : 버퍼 설정 성공

false : 이미 버퍼가 설정되어 있음

public int putData(byte[] buf,
int off,
int len)

Parameters:

  • len - 복사할 크기

Returns:

  • 복사된 크기
public int getData(byte[] buf,
int off,
int len)

Parameters:

  • len - 복사될 크기

Returns:

  • 복사된 크기
public int availableDataSize()

Returns:

  • 이용가능한 데이타 크기
public void clearData()
  • 클립내의 이용가능한 데이타를 모두 버린다.
public String getType()

Returns:

  • Type 문자열
public boolean setPosition(int ms)

Parameters:

  • ms - 클립 재생을 시작할 시작 시점(milli second)

Returns:

  • ture : 성공

false : 설정 실패

public final int getVolume()

Returns:

  • 성공 : 볼륨 값(0-100사이의 볼륨값)
public final boolean setVolume(int level)

Parameters:

  • level - 볼륨값
public void setListener(PlayListener listener)

Parameters:

  • listener - 새로운 listener, 만일 null 이면 기존 것을 제거함
protected boolean playStart(boolean repeat)

Parameters:

  • repeat - Player.play()에 전달된 repeat값
protected boolean recordStart()

Returns:

  • true : Player.record()함수 수행이 정상적으로 수행됨

false : Player.record()함수가 더이상 수행되지 않고 false로 반환됨

public boolean playUpdate(int event,
int parm)

Parameters:

  • parm - 각 event에 추가 전달값이 있을 경우 사용

AromaSoft Corp. Proprietary and Confidential

(C)opyright 2003 AromaSoft Corp. All right reserved. Contact : contact@aromasoft.com