I see. Thanx!
Etiquette, expectations, entitlement...
@autoexec_bin | #magiclantern | Discord | Reddit | Server issues
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Kromofone on September 05, 2012, 05:53:32 PM
Yeah I think it's the canon one!
I'll try to reproduce it and catch it on video, will upload as soon as I accomplish it.
QuoteI get this blinking bar in the middle of the screen
Quote from: Kromofone on September 05, 2012, 05:14:04 PM
Awesomee!!
I'll begin testing it more with caution, thanks for the info!
Quote from: 1% on September 05, 2012, 05:07:41 PM
You can still control output volume like before, right? Just higher default and maximum volume? I've got to work but I'll test when I come back.
I think null wav stream in video still happen but thats better than low bitrate or no sound.
diff -r ae36c8b5889b src/beep.c
--- a/src/beep.c Sun Sep 02 02:50:47 2012 +0900
+++ b/src/beep.c Tue Sep 04 11:33:29 2012 +0900
@@ -322,12 +322,73 @@
return ans;
}
+
+
+typedef struct _write_q {
+ int multiplex;
+ void *buf;
+ struct _write_q *next;
+}WRITE_Q;
+
+#define QBUF_SIZE 4
+#define QBUF_MAX 20
+WRITE_Q *rootq;
+
+static void add_write_q(void *buf){
+ WRITE_Q *tmpq = rootq;
+ WRITE_Q *newq;
+
+ int i=0;
+ while(tmpq->next){
+ tmpq = tmpq->next;
+ i++;
+ }
+ if(i > QBUF_MAX){
+ NotifyBox(2000,"Lost WAV data\nUse more faster card");
+ return;
+ }
+
+ if(tmpq->multiplex < QBUF_SIZE){
+ if(!tmpq->buf){
+ tmpq->buf = alloc_dma_memory(WAV_BUF_SIZE*QBUF_SIZE);
+ }
+ int offset = WAV_BUF_SIZE * tmpq->multiplex;
+ memcpy(tmpq->buf + offset,buf,WAV_BUF_SIZE);
+ tmpq->multiplex++;
+ }else{
+ newq = AllocateMemory(sizeof(WRITE_Q));
+ memset(newq,0,sizeof(WRITE_Q));
+ newq->buf = alloc_dma_memory(WAV_BUF_SIZE*QBUF_SIZE);
+ memcpy(newq->buf ,buf,WAV_BUF_SIZE);
+ newq->multiplex++;
+ tmpq->next = newq;
+ }
+}
+
+static void write_q_dump(){
+ WRITE_Q *tmpq = rootq;
+ WRITE_Q *prevq;
+
+ while(tmpq->next){
+ prevq = tmpq;
+ tmpq = tmpq->next;
+ FIO_WriteFile(file, UNCACHEABLE(tmpq->buf), WAV_BUF_SIZE * tmpq->multiplex);
+ free_dma_memory(tmpq->buf);
+ prevq->next = tmpq->next;
+ FreeMemory(tmpq);
+ tmpq = prevq;
+ }
+}
+
+
+
+
static void asif_rec_continue_cbr()
{
if (file == INVALID_PTR) return;
void* buf = wav_buf[wav_ibuf];
- FIO_WriteFile(file, UNCACHEABLE(buf), WAV_BUF_SIZE);
+ add_write_q(buf);
if (audio_recording == 2)
{
@@ -504,6 +565,21 @@
static void wav_playback_do();
static void wav_record_do();
+
+static void write_q_task()
+{
+ TASK_LOOP
+ {
+ if (audio_recording==1 || rootq->next)
+ {
+ write_q_dump();
+ }
+ msleep(500);
+ }
+}
+
+TASK_CREATE( "write_q_task", write_q_task, 0, 0x16, 0x1000 );
+
static void beep_task()
{
TASK_LOOP
@@ -846,7 +922,10 @@
{
wav_buf[0] = alloc_dma_memory(WAV_BUF_SIZE);
wav_buf[1] = alloc_dma_memory(WAV_BUF_SIZE);
-
+ rootq = AllocateMemory(sizeof(WRITE_Q));
+ memset(rootq,0,sizeof(WRITE_Q));
+ rootq->multiplex=100;
+
beep_sem = create_named_semaphore( "beep_sem", 0 );
menu_add( "Audio", beep_menus, COUNT(beep_menus) );
find_next_wav(0,1);
diff -r ae36c8b5889b src/beep.c
--- a/src/beep.c Sun Sep 02 02:50:47 2012 +0900
+++ b/src/beep.c Mon Sep 03 19:53:43 2012 +0900
@@ -172,7 +172,10 @@
static FILE* file = INVALID_PTR;
#define WAV_BUF_SIZE 8192
static int16_t* wav_buf[2] = {0,0};
+#define WBUF_SIZE 16
+static int16_t* write_buf[WBUF_SIZE];
static int wav_ibuf = 0;
+static int write_ibuf = 0;
static void asif_continue_cbr()
{
@@ -327,7 +330,18 @@
if (file == INVALID_PTR) return;
void* buf = wav_buf[wav_ibuf];
- FIO_WriteFile(file, UNCACHEABLE(buf), WAV_BUF_SIZE);
+ memcpy(write_buf[write_ibuf],buf,WAV_BUF_SIZE);
+ if (write_ibuf==(WBUF_SIZE-1)){
+ int i;
+ for(i=0;i<WBUF_SIZE;i++){
+ void* writebuf = write_buf[i];
+ FIO_WriteFile( file, UNCACHEABLE(writebuf), WAV_BUF_SIZE );
+ }
+ write_ibuf=0;
+ }else{
+ wav_ibuf = !wav_ibuf;
+ write_ibuf++;
+ }
if (audio_recording == 2)
{
@@ -338,7 +352,6 @@
return;
}
SetNextASIFADCBuffer(buf, WAV_BUF_SIZE);
- wav_ibuf = !wav_ibuf;
}
void WAV_Record(char* filename, int show_progress)
@@ -358,7 +371,7 @@
SetSamplingRate(48000, 1);
MEM(0xC092011C) = 4; // SetASIFADCModeSingleINT16
- wav_ibuf = 0;
+ wav_ibuf=0;
StartASIFDMAADC(buf1, WAV_BUF_SIZE, buf2, WAV_BUF_SIZE, asif_rec_continue_cbr, 0);
while (audio_recording)
{
@@ -846,6 +859,10 @@
{
wav_buf[0] = alloc_dma_memory(WAV_BUF_SIZE);
wav_buf[1] = alloc_dma_memory(WAV_BUF_SIZE);
+ int i=0;
+ for(i=0;i<WBUF_SIZE;i++){
+ write_buf[i] = alloc_dma_memory(WAV_BUF_SIZE);
+ }
beep_sem = create_named_semaphore( "beep_sem", 0 );
menu_add( "Audio", beep_menus, COUNT(beep_menus) );
Quote from: ilguercio on September 02, 2012, 02:53:41 AM
BR is bitrate.
QuoteI got echoes sometimes like there is a delay if BR gets too high but I need to test more. Right now I'm starting it manually.
QuoteI dunno if clocking is related as wav audio is separate from MVR and shouldn't be affected by it. Have not tried with FPS override which does change clocking.The clocking is just my guess, I don't know correct point. And MVR with audio need to more CPU/Buffer, because H264 ?clocking? is faster than normal recording. So audio need to fit . It's need a cpu and buffer . So it will stop, I guess.
Page created in 0.095 seconds with 13 queries.