How to play custom WAV data

Started by a1ex, July 30, 2012, 09:29:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

3pointedit

What kind of file does this create? A .WAV? Or is it a peculiar format that needs decoding on the PC?
550D on ML-roids

1%

In theory 48khz wav but I don't think its actually writing them. It just plays back the buffer in the function.

In 600D:

NSTUB(0xFF17F734, str:VOI_FactoryRecord_[VOI]_[VOI_FactoryRecord])

NSTUB(0xFF17F5B4, str:VOI_StopVoiceRecord_[VOI]_StopSemaphore)

But why does it mess with

0x5DC4 (aAJ_0x1F50_SoundDevSet_HDMI_struct_0x00_to_0x50)

Is it related to the crazy "throw music over your files" function.

QuoteYou can now add music to videos in the camera. You can copy the music that Canon provides on the EOS Digital Solution Disk to the memory card using the provided EOS Utility program. Alternately, you can add music from your computer to the memory card, again using the EOS Utility. Then on the camera, you can choose a music selection to play as background music for the video. With the music added, all you need to do is to plug the T3i/600D into a TV, pop some popcorn, and enjoy your HD videos in style.

a1ex

With latest changesets it saves WAV files. You can even add voice tags to photos.

Greg


1%

I'm running out of memory with the latest:

ASSERT: FALSE
at Memory\Memory.c:188, task beep_task
lv:1 mode:20


Magic Lantern version : v2.3.NEXT.2012Aug21.600D102
Mercurial changeset   : e5ac61e7da2b+16278f5df476+ (unified) tip
Built on 2012-08-21 21:59:59 by user@D610.
Free Memory  : 334K + 1019K

157:  5407.154 [STARTUP] too heavy... free : 1018KB
    158:  8937.274 [MEM] NG AllocateMemory 480172
    159:  8937.452 [MEM] Total = 0x8b0000, Free = 0xfe934, MaxReg = 0x54ab8
    160:  8938.398 [MEM] Num Alloc = 3543, Num Free = 335
    161:  8953.146 [STARTUP] ERROR ASSERT : Memory\Memory.c, Task = beep_task
    162:  8953.237 [STARTUP] ERROR ASSERT : Line 188
    163:  8953.276 [STARTUP] ERROR ASSERT : FALSE
    164:  8953.423 [STARTUP] startupErrorRequestChangeCBR (0x1d)
    165:  8953.476 [STARTUP] startupErrorRequestChangeCBR : ErrorSend (101, ABORT)
    166:  8953.745 [STARTUP] ASSERT : Time 2012/8/21 17:10:5




Ok, I've  fixed recording using shoot_malloc. I still get error 70 on playback.

Will this work to free the shooting buffer?
FreeMemory(wav_buf);


Also changed:

FIO_WriteFile(f, shoot_malloc(wav_buf), sizeof(wav_header) + N);

int16_t* long_buf = shoot_malloc(N*2);
if (!long_buf) { N = 48000; long_buf = shoot_malloc(N*2); }
[/quote]

Did I miss a location? I can record a whole 60 second clip but can't even play back 5s... regular beeps work.


Also get a dir err at start but pressing left/right shows the file names and lets them be selected.


I put zebras into exmem space and now I can play back a 5s file. I have 1500k free... I don't think there is any more I can free....

Tried changing file reading to exmem and then I get no ML menu. Exmem is not big enough, I guess. Is there a way to find max size or make it allocate above what canon uses? I also put back allocate memory for short tones and uncachable for file writing (made no difference either way)....

Now recording is great but for some reason playback isn't working. At least the memory problems are gone. Thanks!

miyake

600D recording is working current codes. But play is not working yet.  I will discover how to solve it on 600D.

Anyway, 600D audio forum user testing combination with Sound recording and video recording
http://www.magiclantern.fm/forum/index.php?topic=2032.msg9437#msg9437
It will crash camera, and need battery pull.
Do you know this? And another cameras don't have this issue?


a1ex

As far as I know, 600D is able to beep, so it should playback sound too (maybe you redirect the sound to headphones?)

I didn't try sound recording and video recording at the same time, so it's likely to run into trouble with this.

scrax

I've just tried on last code from miyake and it's working ok now, but since i use Hold->Play feat for image review voice tags can't be used.
Is it possible to have an option to enable it in PLAY mode too?

If there is no audio file associated with the shown pic SET will record Voice Tag, if present it will play it (maybe an icon should be perfect to see the audio file already present) and MENU button can be used to delete them from PLAY mode.
This will also permit to take photos at an events and then tag them after the day maybe with someone who knows the subjects better.
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

a1ex

This would require a way to find out which file is selected in playback mode. If this can be done, the icon and playback are easy to implement.