Trevor Rowe | Hi, Has anybody managed to successfully play audio files in J2ME on the 7925/7926. The best I've managed is to have the files playing at twice the speed they should be. Changing the rates etc doesn't seem to slow the playback to the correct speed, of course everything works fine in the emulator but not on the device To play the file, I simply use Player p = Manager.createPlayer("http://<my file>.wav"); p.start(); According to VLC, the details of the audio file are Codec: PCM S16 LE (araw) Channels: Mono Sample Rate: 8000 Hz Bits Per Sample: 16 The documentation at http://developer.cisco.com/c/document_library/get_file?groupId=2371349&folderId=2378769&name=97114 reads Max audio data size of 250 (javax.microedition. Kbytes media) Down-sampled to 8kS/s, mono before playback Only supported content types: - RAW (no file header information) - uLaw - 8kS/s, 8-bit, single channel (mono) WAV files: • uLaw: 8kS/s, 8 bit, single channel (mono) • PCM: 8-44 kS/s, 8-16 bit, multi-channel So judging by the last line I would have exepected the files to play correctly, but they don't. In the logs on the phone I get 2012-02-27 05:37:53:0510 CP-7925G user.debug java: Trying to play sound http://192.168.0.203/i8.wav 2012-02-27 05:37:53:0510 CP-7925G user.debug java: Manager.jpp():createPlayer(): 1 - param as String locator =http://192.168.0.203/i8.wav 2012-02-27 05:37:53:0860 CP-7925G user.debug java: BasicPlayer():setLoopCount(1) 2012-02-27 05:37:53:0870 CP-7925G user.debug java: BasicPlayer():prefetch 2012-02-27 05:37:53:0870 CP-7925G user.debug java: BasicPlayer():realize() 2012-02-27 05:37:53:0880 CP-7925G user.debug java: WavPlayer():Header Contents: encoding=1, channels=1 2012-02-27 05:37:53:0880 CP-7925G user.debug java: WavPlayer():sRate=8000, bytesPerSecond=16000, align=2, sampleSizeInBits=16 2012-02-27 05:37:53:0880 CP-7925G user.debug java: Duration=6850000 2012-02-27 05:37:53:0950 CP-7925G user.err java: Unknown format!! 2012-02-27 05:37:53:0950 CP-7925G user.notice java: BasicPlayer:nOpen(format=unknown, bits=16, sRate=8000 2012-02-27 05:37:53:0970 CP-7925G user.crit java: Audio Path is set to 2 2012-02-27 05:37:53:0970 CP-7925G user.notice java: AUD Event = AUD_USE_SPEAKER: 0 0 0 2012-02-27 05:37:53:0970 CP-7925G user.notice java: AUD Event = AUD_SET_SPEAKER_VOLUME: 1 0 0 2012-02-27 05:37:53:0970 CP-7925G user.crit java: getVolume()=>16: audio_path=1 2012-02-27 05:37:53:0970 CP-7925G user.notice java: AUD Event = AUD_SET_SPEAKER_VOLUME: 0 0 0 2012-02-27 05:37:53:0970 CP-7925G user.notice java: setVolume(16):AUD_setVolume(audio_path=2 level=0) 2012-02-27 05:37:53:0970 CP-7925G user.notice java: AUD Event = AUD_SET_SPEAKER_VOLUME: 0 0 0 2012-02-27 05:37:53:0970 CP-7925G user.notice java: setVolume(16):AUD_setVolume(audio_path=2 level=0) 2012-02-27 05:37:53:0980 CP-7925G user.debug java: BasicPlayer():realize() 2012-02-27 05:37:53:0980 CP-7925G user.debug java: BasicPlayer():start() 2012-02-27 05:37:53:0980 CP-7925G user.notice java: AUD_PlayStreamAudio CODEC type 176 2012-02-27 05:37:53:0980 CP-7925G user.notice java: AUD Event = AUD_PlayStreamAudio 0 2012-02-27 05:37:53:0980 CP-7925G user.notice java: AUD_PlayStreamAudio CODEC type 176 2012-02-27 05:37:54:0220 CP-7925G user.notice java: AudEventRspQueue - msgrcv qid : 0x48009, buf 0xbfff5814, size 4 rv 4 2012-02-27 05:37:54:0220 CP-7925G user.notice java: AUD Event = AUD_PlayStreamAudio 7680 2012-02-27 05:37:54:0220 CP-7925G user.notice java: AUD_PlayStreamAudio CODEC type 176 Obviously there is the line saying Unknown format, but why? Can somebody tell me what I'm doing wrong Thanks in advance |