PDA

View Full Version : How to set path to memory card of the mobile?



harish
20th February 2012, 09:36
Hi All,
I am using latest qt version 4.7,where i developed an application on Audio Recording. I need to set the path to memory card(ie,mass memory),I have seen links based on carbide link :http://www.developer.nokia.com/Commu..._manufacturers
But could not find any solution for this latest version.

Can anyone help me out in finding this!!

This is what i tried.I used two methods but i am clueless…. But the audio file gets stored in simulator ,,but not in desired memory card location!!!

AudioBuffer::AudioBuffer()
{
audioSource = new QAudioCaptureSource();
capture = new QMediaRecorder(audioSource);

QAudioEncoderSettings audioSettings;
audioSettings.setCodec("audio/vorbis");
audioSettings.setQuality(QtMultimediaKit::HighQual ity);
capture->setEncodingSettings(audioSettings);
capture->setOutputLocation(QUrl::fromLocalFile("test.wav"));

FileName path = PathInfo::MemoryCardRootPath();
path.Append( PathInfo::SoundsPath() );

// QFile file;
// QDir::setCurrent("/tmp");
// file.setFileName("test.wav");
// QDir::setCurrent("/home");
// file.open(QIODevice::ReadOnly);
}

I am using Symbian platform(Qt-Quick)

Regards,
Harish.

mvuori
20th February 2012, 18:15
I don't know anything about sound recording, but in your code, after you set the variable path, you do nothing with it.