コード例 #1
0
ファイル: init.c プロジェクト: Niklasalander/programs
/***** 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);
}
コード例 #2
0
ファイル: soundeditwidget.cpp プロジェクト: lenggi/kcalcore
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() );
}