GTAdhocAPI
Gran Turismo (6) Adhoc API Documentation
Loading...
Searching...
No Matches
pdistd::MMusic Class Reference

Music handling interface. More...

Public Member Functions

 MMusic ()
 constructor taking no param More...
 
void load (String type)
 Unknown. Type is 'system', 'pcm', 'midi'. More...
 
void unload ()
 
Int play (String group)
 Starts playing a group. i.e "menu". More...
 
Int playex (String group)
 Starts playing a group. i.e "menu". More...
 
Int playDirect (String code)
 Starts playing a music code. i.e "GT6_Menu01". More...
 
Int keep (String group)
 Unknown. i.e "menu". More...
 
Int keepDirect (String code)
 Unknown. i.e "GT6_Menu01". More...
 
void stop (Float fadeout_seconds=0.0)
 Stops playback (with fadeout if provided) More...
 
void pause (Bool pause)
 Pauses playback. More...
 
void fadein (Float time=3.0)
 Fades in playback (in seconds) More...
 
void fadeinDirect (Float time=3.0)
 Fades in playback - Direct (in seconds) More...
 
void fadeout (Float time=3.0)
 Fades out playback (in seconds) More...
 
Int isPlaying ()
 Returns whether the mmusic is playing music. More...
 
Int isPausing ()
 Returns whether the mmusic's playback is paused. More...
 
Array< StringgetGroups ()
 Gets all the groups from the BGM file as a string array. More...
 
Array< MapgetMusics (String group)
 Gets all the musics in the specified group i.e "menu". More...
 
Map getMusicInfo (String code)
 Gets a music by code i.e "GT6_Menu01". More...
 
Int setCurrentVolume ()
 Stripped. More...
 
Int getNativeHandle ()
 Gets the native pointer address. More...
 

Public Attributes

Int number
 Number. More...
 
Int repeat
 Defaults -1, 0 = no repeat, 1 = repeat. More...
 
Float volume
 Gets or sets the volume. 0.0 to 1.0, Defaults 1.0. More...
 
Float crossfade_time
 Gets or sets the crossfade time. Defaults 0.0. More...
 

Detailed Description

Music handling interface.

Definition at line 6 of file MMusic.cpp.

Constructor & Destructor Documentation

◆ MMusic()

pdistd::MMusic::MMusic ( )
inline

constructor taking no param

Definition at line 10 of file MMusic.cpp.

Member Function Documentation

◆ fadein()

void pdistd::MMusic::fadein ( Float  time = 3.0)

Fades in playback (in seconds)

◆ fadeinDirect()

void pdistd::MMusic::fadeinDirect ( Float  time = 3.0)

Fades in playback - Direct (in seconds)

◆ fadeout()

void pdistd::MMusic::fadeout ( Float  time = 3.0)

Fades out playback (in seconds)

◆ getGroups()

Array< String > pdistd::MMusic::getGroups ( )

Gets all the groups from the BGM file as a string array.

◆ getMusicInfo()

Map pdistd::MMusic::getMusicInfo ( String  code)

Gets a music by code i.e "GT6_Menu01".

Returns
Map with keys:
  • (String) artist
  • (String) code
  • (String) file
  • (String) genre
  • (String) title

◆ getMusics()

Array< Map > pdistd::MMusic::getMusics ( String  group)

Gets all the musics in the specified group i.e "menu".

Returns
Array of maps with keys:
  • (String) artist
  • (String) code
  • (String) file
  • (String) genre
  • (Int) index
  • (String) title

◆ getNativeHandle()

Int pdistd::MMusic::getNativeHandle ( )

Gets the native pointer address.

◆ isPausing()

Int pdistd::MMusic::isPausing ( )

Returns whether the mmusic's playback is paused.

◆ isPlaying()

Int pdistd::MMusic::isPlaying ( )

Returns whether the mmusic is playing music.

◆ keep()

Int pdistd::MMusic::keep ( String  group)

Unknown. i.e "menu".

Returns
0 not playing, 1 playing

◆ keepDirect()

Int pdistd::MMusic::keepDirect ( String  code)

Unknown. i.e "GT6_Menu01".

Returns
0 not playing, 1 playing

◆ load()

void pdistd::MMusic::load ( String  type)

Unknown. Type is 'system', 'pcm', 'midi'.

◆ pause()

void pdistd::MMusic::pause ( Bool  pause)

Pauses playback.

◆ play()

Int pdistd::MMusic::play ( String  group)

Starts playing a group. i.e "menu".

Returns
0 not playing, 1 playing

◆ playDirect()

Int pdistd::MMusic::playDirect ( String  code)

Starts playing a music code. i.e "GT6_Menu01".

Returns
0 not playing, 1 playing

◆ playex()

Int pdistd::MMusic::playex ( String  group)

Starts playing a group. i.e "menu".

Returns
0 not playing, 1 playing

◆ setCurrentVolume()

Int pdistd::MMusic::setCurrentVolume ( )

Stripped.

◆ stop()

void pdistd::MMusic::stop ( Float  fadeout_seconds = 0.0)

Stops playback (with fadeout if provided)

◆ unload()

void pdistd::MMusic::unload ( )

Member Data Documentation

◆ crossfade_time

Float pdistd::MMusic::crossfade_time

Gets or sets the crossfade time. Defaults 0.0.

Definition at line 98 of file MMusic.cpp.

◆ number

Int pdistd::MMusic::number

Number.

Definition at line 89 of file MMusic.cpp.

◆ repeat

Int pdistd::MMusic::repeat

Defaults -1, 0 = no repeat, 1 = repeat.

Definition at line 92 of file MMusic.cpp.

◆ volume

Float pdistd::MMusic::volume

Gets or sets the volume. 0.0 to 1.0, Defaults 1.0.

Definition at line 95 of file MMusic.cpp.


The documentation for this class was generated from the following file: