Languages

Menu
Sites
Language
How to play midi file format from Tizen?

HI!!

I can not play MIDI files using the media player of Tizen....

static player_h _player_create()
{
    player_h player;

    if(player_create(&player) == PLAYER_ERROR_NONE)
    {
        player_set_uri(player, get_resource_path("sounds/1.mid"));
        player_set_sound_type(player, SOUND_TYPE_MEDIA);
        player_set_volume(player, 1.0, 1.0);
        player_set_looping(player, true);
        player_prepare(player);
    }

    return player;
}

 

How to play midi file format from Tizen?

Edited by: Hyun Ho Lee on 21 Jul, 2015
View Selected Answer

Responses

7 Replies
Palitsyna

Hello,

below you can find the audio tutorial, that says that Tizen supports the following formats: MP4, 3GP, AVI, WM 7/8, ASF, MKV, MP3, AAC, WMV, AMR, WMA, OGG, WAV. 

https://developer.tizen.org/community/tip-tech/audio-video-playback-tutorial#codec

Hyun Ho Lee

Thank you for your answer :)

The above code operates in different file formats(ex: .mp3,.wav,.aac) 
(mobile phone is z1)

 

 

Common    

 

  • FFmpeg plugins
  • Vorbis plugins

DifferenceTarget:

- Uses h/w codecs instead of FFmpeg plugins

- Available up to WMA9

- Support MMF, IMY,SMAF, and MIDI types

Emulator:

- Available up to WMA8

 

 

tizen 2.3 version supports MIDI file format.(.mid)

In practice, however MIDI file format does not operate....

Palitsyna

Yes, I've seen that information (DifferenceTarget), but anyway I haven't seen any tutorial how to play midi files using Z1 device. 

Vikram

what's the error code as your sample code, such as the return error code of player_prepare(), player_start().

Hyun Ho Lee

Thank you for your answer. :)

My code is part of the code for reading the MIDI file.

Of course, The above code operates in different file formats(ex: .mp3,.wav,.aac)

But, MIDI file format does not operate....

Hyun Ho Lee

the return value of player_prepare()

 

1.midi

player_prepare() : -26476509 (????) 

2.mp3, wav, aac ...

player_prepare() : 0 

 

Mark as answer
Alex Dem

Hi,
I think this negative value mean PLAYER_ERROR_NOT_SUPPORTED_FILE error.
PLAYER_ERROR_NOT_SUPPORTED_FILE = PLAYER_ERROR_CLASS | 0x03
PLAYER_ERROR_CLASS = TIZEN_ERROR_PLAYER | 0x20
TIZEN_ERROR_PLAYER= -0x01940000 
-0x01940000+0x20+0x3 is equal-26476509 in decimal system.
Alexey.