Embedded Systems Course - Lecture 06 - C Programming Language Review -- Part 3

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I think it's equivalent to the buffer being in RAM and then the recording being put into a permanent storage. Anyway, the point is to allocate memory while recording so you have somewhere to put the digitized audio, and you just need 'enough' space ... but when you want to store it you don't want it taking more space than it has to, so you allocate exactly the amount of space you need, which you now know how much is because you've finished recording the audio.

johannesgh
Автор

Thank you for posting this. Very useful

acalin
Автор

I'm a bit perplexed by your memo recorder example. For example, where is the "buffer" array? I must have missed where you allocated that in memory. Then you seem to be re-sizing the buffer array until the recording stops--and then, once the recording stops, you malloc memory for the recording? But haven't you already recorded the data in the buffer array?

tcbetka
join shbcf.ru