flac 파일을 여러 조각으로 분할해야합니다. 나는 또한 매우 초 값이 seekpoints 활용하는 방법을 제대로 이해하지 FLAC 파일 jFLAC. FLAC 파일 분할
FLACDecoder decoder = new FLACDecoder(inputStream);
다음 내가 SeekPoints
decoder.decode(seekPointFrom, seekPointTo);
에 사이에 부모 파일을 디코딩하는 것을 시도하고있다을 읽을 수 jFLAC 라이브러리를 사용하고 있습니다 . 예를 들어, 0 초부터 150 초까지의 첫 탐색 지점이 필요합니다. 오른쪽 탐색 객체를 얻는 방법? Seekpoint cinstructor는
/**
* The constructor.
* @param sampleNumber The sample number of the target frame
* @param streamOffset The offset, in bytes, of the target frame with respect to beginning of the first frame
* @param frameSamples The number of samples in the target frame
*/
public SeekPoint(long sampleNumber, long streamOffset, int frameSamples) {
this.sampleNumber = sampleNumber;
this.streamOffset = streamOffset;
this.frameSamples = frameSamples;
}
는 모든 읽기 청크 조치를 듣고 어떤 청취자가 디코더입니다.
@Override
public void processPCM(ByteData pcm) {
try {
outputStream.write(pcm.getData(), 0, pcm.getLen());
} catch (IOException e) {
e.printStackTrace();
}
}
필자는 새로운 flac 파일을 재생하려고하고 있지만 플레이어는 해당 파일에 대해 잘못된 경고를합니다. Flac 파일이 제대로 열리려면 어떻게해야합니까? 어쩌면이 파일에 다른 헤더를 써야할까요?
[jFLAC 메일 링리스트] (http://jflac.sourceforge.net/mail-lists.html)에서이 질문을해야합니다. –