Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 55830 Details for
Bug 76127
Gyach enhanced is a Yahoo Messenger linux client
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Voice Test works
pytsp_recording_1.0.7.patch (text/plain), 2.63 KB, created by
Marvin
on 2005-04-09 21:40:54 UTC
(
hide
)
Description:
Voice Test works
Filename:
MIME Type:
Creator:
Marvin
Created:
2005-04-09 21:40:54 UTC
Size:
2.63 KB
patch
obsolete
>diff -ruN pytsp/pyesd.c pytsp.fixed/pyesd.c >--- pytsp/pyesd.c 2005-04-09 15:35:43.000000000 -0700 >+++ pytsp.fixed/pyesd.c 2005-04-09 21:24:58.000000000 -0700 >@@ -566,44 +566,30 @@ > > void esd_stop_recording() {stop_recording=1;} > >-char *esd_record_sound(int len, int rate_hz, int channelsd, int formatd) { >- int nread=-1; >- char rbuf[ESD_BUF_SIZE]; /* ESD_BUF_SIZE */ >- char *rbuf2=rbuf; >- char buffer[len+1]; >- char *buffer_d=buffer; >- int cursor=1; >- int copyi; >- int space_left; >+/* >+ function: esd_record_sound >+ rewritten for bug fixes and concise-ness >+ by Marvin Otto - sivunguvungu at cox.net >+ on 9 April 2005. >+ >+ output: returns a pointer to allocated memory or NULL if error >+ be sure to free it when finished. >+*/ > >- /* FILE *target; */ >- space_left=len-cursor; >+char *esd_record_sound(int len, int rate_hz, int channelsd, int formatd) { >+ char *buffer = NULL; >+ int cursor = 0; > > if (init_esd_record( rate_hz, channelsd, formatd)) { >- >- /* target = fopen( "aggy.raw", "w" ); */ >- sprintf(buffer,"%s",""); >+ buffer = malloc(len + 1); >+ memset(buffer, 0, len + 1); // ZeroMemory > stop_recording=0; > >- while (space_left>0) { >- nread=record(rbuf,ESD_BUF_SIZE); >- if (! nread) {break;} >- copyi=nread; >- if (copyi>space_left) {copyi=space_left;} >- >- /* fwrite( buf2, 1, nread, target ); */ >- strncat(buffer,rbuf,copyi); >- cursor=cursor+copyi; >- space_left=len-cursor; >+ while (!stop_recording && (cursor += record(buffer + cursor, len - cursor)) < len) > sleep(0.007); >- if (stop_recording==1) {break;} >- } >- /* fclose(target); */ >- >- >- } else {return NULL; } >+ } > >- return buffer_d; >+ return buffer; > } > > >@@ -667,7 +653,3 @@ > free(myptr); > return written; > } >- >- >- >- >diff -ruN pytsp/pytruespeech.c pytsp.fixed/pytruespeech.c >--- pytsp/pytruespeech.c 2005-04-09 15:35:43.000000000 -0700 >+++ pytsp.fixed/pytruespeech.c 2005-04-09 21:26:06.000000000 -0700 >@@ -642,25 +642,24 @@ > recording_driver=1; > > if (recorded != NULL) { >- if (strlen(recorded)>=4096) { >+ // if (strlen(recorded)>=4096) { > ofile=fopen(infile, "wb"); > if (ofile) { > >- owritten=fwrite(recorded, 1, strlen(recorded), ofile); >+ //owritten=fwrite(recorded, 1, strlen(recorded), ofile); >+ owritten=fwrite(recorded, 1, ilen, ofile); > fflush(ofile); > fclose(ofile); > >- if (owritten==strlen(recorded)) { >+ //if (owritten==strlen(recorded)) { >+ if (owritten==ilen){ > > if (convertfile(infile, outfile, 8000, 16,1, 1)) { return outfile;} >- } >+ } > >- } >- >- } >- >- } >+ } >+ // } >+ free(recorded); >+ } > return ""; > } >- >-
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 76127
:
51178
|
53246
|
53247
|
53248
|
53659
|
53660
|
54911
|
54914
|
55611
|
55612
|
55613
|
55628
|
55629
|
55630
|
55631
|
55698
|
55699
|
55700
| 55830 |
57052
|
57054
|
57684
|
60349
|
60350
|
60351
|
60353
|
62038