Author Topic: Anyone find any Sound Events / Recording Access?  (Read 3396 times)

Offline Barney Fife

  • Hero Member
  • *****
  • Posts: 1157
    • Gay Outdoorsmen
Anyone find any Sound Events / Recording Access?
« on: 25 / December / 2007, 06:39:56 »
Deleted
« Last Edit: 22 / April / 2008, 18:13:59 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Re: Anyone find any Sound Events / Recording Access?
« Reply #1 on: 19 / April / 2008, 23:51:29 »
Maybe function for playing different camera sounds can be useful for script writers.

PT_PlaySound(short sound, void* cb_on_end_of_play);
where cb_on_end_of_play is pointer to function (maybe void (void)) called on end of play or NULL,
sound is one of internal camera sounds:
0x2001 - startup sound
0x2002 - shutter sound
0x2003 - button press sound
0x2004 - self-timer sound
0xC211, 0xC20A, 0xC210 - short beep
0x400D - continuous "beeee"
0xC507 - ??
and experimentally found 50000 - AF confirmation

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Re: Anyone find any Sound Events / Recording Access?
« Reply #2 on: 20 / April / 2008, 00:30:34 »
BTW, "my camera" sounds and startup image(s) stored in flash and can be easy extracted from firmware dump using hex-editor - at least for A-series cameras. Be careful and do not store private information there while dumping!  :D

Offline jetzt

  • Sr. Member
  • ****
  • Posts: 316
  • [A710IS,(SD200)]
Re: Anyone find any Sound Events / Recording Access?
« Reply #3 on: 20 / April / 2008, 21:22:29 »
Translation: Don't have your start-up sound event say something like, "For a good time, call (phone number)". :D


Yes. We should have a jokes section!

Offline PhyrePhoX

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 2254
  • make RAW not WAR
    • PhyreWorX
Re: Anyone find any Sound Events / Recording Access?
« Reply #4 on: 20 / April / 2008, 23:52:31 »
ewavr: is there an implementation yet? this would be really great! thanks.
maybe - and i do hope this will be possible - i can replace the UGLY "click sound" in videos when you take a photo. replacing it by a wav file with no data. funny thing is, in the s3is manual is stated that the audio clip during movie recording will not be interrupted when you take pics (opposing to the video of course) but this aint true (a loud CLICK sound is indeed an interruption, especially when you film a performance of classical music and take some pics during that).
looking forward to the implementation :)
keep up the good work!!!!

Offline PhyrePhoX

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 2254
  • make RAW not WAR
    • PhyreWorX
Re: Anyone find any Sound Events / Recording Access?
« Reply #5 on: 21 / April / 2008, 11:40:14 »
hm, i hate to say it: barney, i think you may be right about that :D
damn. so it's noise in my pictures and noise in my videos now :D darn. they could have at least muted the mic in the moment of shooting. it's really disturbingly loud. well yes, removing the noise afterwards is a good idea, have to edit the videos anyways(dramatically reduce in size, any tips regarding cutting down size without real loss of "information" using virtualdub? codec hints?) so i guess editing sound file isnt that a biggie. still sucks though.
haha funny, i just read your edit, should have read it earlier as i almost completely repeat your edit :D
yeah i have two cams now (well actually i lied all the time, the a620 wasnt mine, it was my girlfriend's :D) but bringing two (not really pocketsized) cams to a concert and a tripod, well, i suppose they wont even let me enter the event :D but for other things this will be the solution, yes :)

Offline PhyrePhoX

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 2254
  • make RAW not WAR
    • PhyreWorX
Re: Anyone find any Sound Events / Recording Access?
« Reply #6 on: 14 / July / 2008, 05:02:46 »
*BUMP*
Quote
Maybe function for playing different camera sounds can be useful for script writers.

PT_PlaySound(short sound, void* cb_on_end_of_play);
where cb_on_end_of_play is pointer to function (maybe void (void)) called on end of play or NULL,
sound is one of internal camera sounds:
0x2001 - startup sound
0x2002 - shutter sound
0x2003 - button press sound
0x2004 - self-timer sound
0xC211, 0xC20A, 0xC210 - short beep
0x400D - continuous "beeee"
0xC507 - ??
and experimentally found 50000 - AF confirmation

Ewavr, do you think you can turn this into an actual working function or tell us how we can do this ourselves (well, not me, but the more experienced ida cracks)?

thanks in advance, PhoX :)

*BUMP*

Offline a710is

  • Sr. Member
  • ****
  • Posts: 250
  • A710 IS
Re: Anyone find any Sound Events / Recording Access?
« Reply #7 on: 14 / July / 2008, 12:04:27 »
what about the short "beep-beep" that the camera makes once video recording starts or when you half press the shutter? can that be disabled? I've disabled all sounds but I couldn't get rid of that

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Re: Anyone find any Sound Events / Recording Access?
« Reply #8 on: 14 / July / 2008, 14:46:50 »
what about the short "beep-beep" that the camera makes once video recording starts or when you half press the shutter? can that be disabled? I've disabled all sounds but I couldn't get rid of that

Turn on "Mute" function in camera menu (or hold "disp" button when camera powered-up).

CHDK Forum

Re: Anyone find any Sound Events / Recording Access?
« Reply #8 on: 14 / July / 2008, 14:46:50 »

Offline a710is

  • Sr. Member
  • ****
  • Posts: 250
  • A710 IS
Re: Anyone find any Sound Events / Recording Access?
« Reply #9 on: 14 / July / 2008, 15:08:25 »
I thought mute was already on, anyway, it worked. thanks once again ewavr.

Offline PhyrePhoX

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 2254
  • make RAW not WAR
    • PhyreWorX
Re: Anyone find any Sound Events / Recording Access?
« Reply #10 on: 14 / July / 2008, 15:56:59 »
uhm, thanks for hijacking the thread. i merely asked how to activate sounds, you asked how to deactivate sounds ;)
ewavr, got any clues about this?

Offline PhyrePhoX

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 2254
  • make RAW not WAR
    • PhyreWorX
Re: Anyone find any Sound Events / Recording Access?
« Reply #11 on: 26 / July / 2008, 22:57:36 »
Maybe function for playing different camera sounds can be useful for script writers.

PT_PlaySound(short sound, void* cb_on_end_of_play);
where cb_on_end_of_play is pointer to function (maybe void (void)) called on end of play or NULL,
sound is one of internal camera sounds:
0x2001 - startup sound
0x2002 - shutter sound
0x2003 - button press sound
0x2004 - self-timer sound
0xC211, 0xC20A, 0xC210 - short beep
0x400D - continuous "beeee"
0xC507 - ??
and experimentally found 50000 - AF confirmation

okay, with my newly found "passion" for asm i managed to find this function in the s3is dump. wasn't that hard actually, i guess it will be easy for the other cams as well.
BUT, how do i actually get it into CHDK? i mean especially the "void* cb_on_end_of_play" bit, is cb_on_end_of_play an actual function? didnt find it in the names list of IDA, i guess it is just a replacement name by you. Can you give an example implementation for the S3is so i can replay it on my box and do it again for other cameras, please?

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Re: Anyone find any Sound Events / Recording Access?
« Reply #12 on: 26 / July / 2008, 23:43:02 »
For the beginning, simpy use NULL instead of callback function.

_PT_PlaySound(2001, NULL); // plays startup sound

However, callback function can be useful, for example, for busy flag handling (just for reference, not tested):

volatile int sound_busy=0;

void sound_callback(void){
 sound_busy=0;
}

void play_sound(short sound){
 while (sound_busy) _SleepTask(10);
 sound_busy=1;
 _PT_PlaySound(sound, sound_callback);
}

If we call play_sound() while previous sound is played, it waits for  previous sound termination, starts new sound playing and exits immediately. At end of play some OS task (which plays sound) calls our function sound_callback(), which resets sound_busy flag.

Offline PhyrePhoX

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 2254
  • make RAW not WAR
    • PhyreWorX
Re: Anyone find any Sound Events / Recording Access?
« Reply #13 on: 27 / July / 2008, 02:43:07 »
i royally failed in doing it. i think i am too stupid :D

this is what i did: Diff pastecode - collaborative debugging tool
this is about the 100th version i did, it maybe is the most stupid thing you ever read. please dont be harsh on me, ewavr :D
at one point it compiled, but when i executed the function, the cam crashed. i dont know how to continue. :(

sorry, in the diff there is not only playsound but the temperaturestuff, ignore it :D
« Last Edit: 27 / July / 2008, 02:45:06 by PhyrePhoX »

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Re: Anyone find any Sound Events / Recording Access?
« Reply #14 on: 28 / July / 2008, 01:38:00 »
Try also
NHSTUB(PT_PlaySound, 0xFFB3163C)

Correct prototype:
void _PT_PlaySound(short , void*); 

but this cannot crash camera. Main error is:

play_sound(2001)

not 2001, but 0x2001 !

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal