Closed GarryCZ closed 2 years ago
Hi,
good place to do this is Recorder::start
. You should replace line
m_mp3Writer = std::make_unique<Mp3Writer>(m_config, frequency, mp3SampleRate);
with
if (m_mp3Writer) {
addToDb(m_mp3Writer->getFrequency(), m_mp3Writer->getFilename(), m_mp3Writer->getTime());
}
m_mp3Writer = std::make_unique<Mp3Writer>(m_config, frequency, mp3SampleRate);
You should implement addToDb
method with any db
/http
library you want and add getFrequency
, getFilename
, getTime
getter to Mp3Writer
class.
Another way to do this is add similar code in Mp3Writer::~Mp3Writer()
.
thank you so much, i will try.
hi, i wrote it in mp3_writer and it already works for me. thank you very much
@GarryCZ will you publish that code? Create PR maybe?
Hi, your project is amazing. It works absolutely great. But I would have a query, I would need to write data (frequency, file name and time) to the SQL database (for example via http request) Could you please advise me? Thank you so much