상세 컨텐츠

본문 제목

[안드로이드 ERROR ] SoundPool 사용시 Not active and NO_MORE_BUFFERS

Android.. Story

by HeyLee 2012. 4. 1. 16:38

본문




 

진짜 별거 아닌 에러인데..- _-; 코딩하고 테스트 하다보면 갑자기 


효과음중 몇개가 안나오는 경우가 생긴다..이건 에러로 찍히지도 않는다..

그냥 일반 로그 값으로 찍히는거다..


처음에는 이게 에러 코드인줄 알았다 - _-;;;;


AudioTrack::set channels[12] format[1] sampleRate[44100], framecount[4096]


그런 경우에... 당황하고 시간을 많이 뻇기게 된다..나 역시..- _-; 2시간 허비했다..;


실제 관련 로그는 바로 아래에 있는것이다...


 Not active and NO_MORE_BUFFERS 


이 에러 경우에는 처음 선언에 문제가 있을뿐이다..

 

SoundPool pool;

pool= new SoundPool(10,AudioManager.STREAM_MUSIC,0);


SoundPool 선언시 max Streams를 너무도 낮게 잡아서 그렇다 - _-;;; maxStreams를 높게 잡아주자...


내 두시간 돌리도.. 사장님 죄송합니다 오늘도 야근을....[끌려간다]


android.media.SoundPool.SoundPool(int maxStreams, int streamType, int srcQuality)



public SoundPool (int maxStreams, int streamType, int srcQuality)

Since: API Level 1

Constructor. Constructs a SoundPool object with the following characteristics:

Parameters

maxStreams

the maximum number of simultaneous streams for this SoundPool object

streamType

the audio stream type as described in AudioManager For example, game applications will normally useSTREAM_MUSIC.

srcQuality

the sample-rate converter quality. Currently has no effect. Use 0 for the default.

Returns

  • a SoundPool object, or null if creation failed

Public Methods


 


관련글 더보기

댓글 영역