Esempio n. 1
0
/***** loads all sounds *****/
void loadSounds(Main *main, int *flap)
{
    Mix_OpenAudio(44100,MIX_DEFAULT_FORMAT,2,2048);
    Mix_VolumeMusic(64);

    int num = *flap;
    changeSound(num, &*main);
}
Esempio n. 2
0
void SoundEditWidget::contextMenuEvent( QContextMenuEvent *event )
{
  QMenu menu;

  if ( mHasSound ) {
    menu.addAction( i18n( "Play" ), this, SLOT(playSound()) );
  }

  if ( !mReadOnly ) {
    menu.addAction( i18n( "Change..." ), this, SLOT(changeSound()) );
  }

  if ( mHasSound ) {
    menu.addAction( i18n( "Save..." ), this, SLOT(saveSound()) );

    if ( !mReadOnly ) {
      menu.addAction( i18n( "Remove" ), this, SLOT(deleteSound()) );
    }
  }

  menu.exec( event->globalPos() );
}