예제 #1
0
void MainWindow::openFile()
{
    loadMp3(QFileDialog::getOpenFileName(
            this, tr("Open MP3 Files"),
            QDesktopServices::storageLocation(QDesktopServices::MusicLocation),
            "MP3 Files (*.mp3)", 0)
    );
}
예제 #2
0
void JpwordReader::loadCourse(int courseNo){
	levels.clear(-1,MAX_LEVEL);
	loadCache(levels, courseNo);
	if(levelList().empty()){
		IOUtils::log("loading from cache failed.");
		loadMp3(levels,courseNo);
	}else{
		IOUtils::log("loaded from cache.");
	}
}
예제 #3
0
void MainWindow::droppedFiles(const QList<QUrl> list)
{
    if (list.size() < 1)
        return;

    QString url = list.at(0).path(),
            fileName = url.mid(1, url.length() - 1);

    qDebug() << "file: " << fileName;
    loadMp3(fileName);
}
예제 #4
0
		Sound::Sound(std::string name,std::string filePath,bool streaming)
		{
			_name = name;
			_filePath = filePath;
			_stream = streaming;

			_looped = false;
			_paused = false;

			int stream = streaming == true ? 1 : 0;

			_sound = loadMp3((char*)filePath.c_str(),stream);
		}