This page was last modified 12:06, 23 August 2007.
KIJ000585 - MIDIControl.setChannelVolume may panic if MIDI channel volume changes independently at the same time
From Forum Nokia Wiki
MIDIControl.setChannelVolume may panic if MIDI channel volume changes independently at the same time
|
KIJ000585
|
Overview
| -
|
Reported against
| S60 3rd Edition
|
Category
| Java
|
Subcategory
| Mobile Media API
|
Date identified
| February 22, 2007
|
Symptoms
| -
|
Detailed description
| If MIDIControl.setChannelVolume is used when the MIDI engine is started (e.g., the MIDI file player is started or a player using device://midi is prefetched or started), a panic may occur if the volume of any MIDI channel changes independently at the same time as MIDIControl.setChannelVolume is called. This might happen if the MIDI file contains events for changing channel volumes, or if a set channel volume event is sent manually using the MIDIControl.shortMidiEvent method.
|
How to reproduce
| colspan = "2" 1) Start the MIDI player (MIDI file player or device://midi player). 2) Get MIDIControl from the player and manually change a channel volume with: MIDIControl.shortMidiEvent( MIDIControl.CONTROL_CHANGE | 0, 0x07, 80 ); 3) Immediately call MIDIControl.setChannelVolume: MIDIControl.setChannelVolume( 0, 0 );
|
Solution
| colspan = "2" Use the following call instead of MIDIControl.setChannelVolume to change channel volumes when playback is on: MIDIControl.shortMidiEvent( MIDIControl.CONTROL_CHANGE | a, 0x07, b); where ’a’ is MIDI channel number and ’b’ is desired MIDI channel volume. MIDIControl.setChannelVolume can be used when the MIDI engine is started (e.g., when the MIDI file player is prefetched but not started), but for convenience it is always safe to use the MIDIControl.shortMidiEvent method. This issue has been fixed in S60 3rd Edition, FP1.
|