Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:MIDIControl.setChannelVolume may panic if MIDI channel volume changes independently at the same time (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Created: User:Technical writer 1 (22 Feb 2007)
Last edited: hamishwillee (16 Aug 2013)


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

  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 );


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.

This page was last modified on 16 August 2013, at 06:03.
35 page views in the last 30 days.