~ubuntu-branches/ubuntu/karmic/asterisk/karmic

« back to all changes in this revision

Viewing changes to formats/format_wav.c

  • Committer: Bazaar Package Importer
  • Author(s): Faidon Liambotis, Tzafrir Cohen, Faidon Liambotis
  • Date: 2007-12-06 17:20:21 UTC
  • mfrom: (1.1.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206172021-pd0wrjirz3os7hia
Tags: 1:1.4.15~dfsg-1
* New upstream release (Closes: #452054)
  - Fix a potential corrupt of voicemail.conf on simultaneous PIN updates
    (Closes: #353227)

[ Tzafrir Cohen ]
* Add some sample/reference config files as documentation.
* Provide asterisk-bristuff for upgrading from Etch.
* Move libc-client to not be last, so debian/backports/xorcom.etch would
  still work.

[ Faidon Liambotis ]
* Really enable the libcap/ToS functionality; the previous patch didn't
  enable the functionality, even though the code and the libcap.so
  dependency were there. (Closes: #454342)
* Fix a minor issue with init script's stop target when running with
  safe_asterisk.
* Add chan_vpb, adding support for VoiceTronix OpenSwitch and OpenLine
  cards. (Closes: #396499)
* Fix debian/watch by using a pkg-voip wrapper to avoid upstream's silly
  redirections. (Closes: #449706)
* Use DEBVERSION as asterisk's version string.
* Disable the MD5 build sum that breaks all out-of-tree plugins (duh!).
* Create /usr/local/share/asterisk/sounds to put all site-specific
  non-modifiable sounds.
* Add a note about bugs.debian.org to the banner.
* Add noload for res_config_* since loading them results in errors and
  doesn't provide any functionality.
* News entries were added but we never shipped the file; ship NEWS.Debian.
* Add an entry to NEWS.Debian warning users about app_voicemail_*.so
  (Closes: #452596)
* Provide options in /etc/default/asterisk for configuring safe_asterisk.
  (Closes: #381786)

[ Tzafrir Cohen ]
* Provide a custom sounds directory under /var/lib - user-modifieble at
  runtime and hence not under /usr. (Closes: #337209)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "asterisk.h"
28
28
 
29
 
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 60325 $")
 
29
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 90155 $")
30
30
 
31
31
#include <unistd.h>
32
32
#include <netinet/in.h>
324
324
        /* We don't have any header to read or anything really, but
325
325
           if we did, it would go here.  We also might want to check
326
326
           and be sure it's a valid file.  */
327
 
        struct wav_desc *tmp = (struct wav_desc *)s->private;
 
327
        struct wav_desc *tmp = (struct wav_desc *)s->_private;
328
328
        if ((tmp->maxlen = check_header(s->f)) < 0)
329
329
                return -1;
330
330
        return 0;
344
344
static void wav_close(struct ast_filestream *s)
345
345
{
346
346
        char zero = 0;
347
 
        struct wav_desc *fs = (struct wav_desc *)s->private;
 
347
        struct wav_desc *fs = (struct wav_desc *)s->_private;
348
348
        /* Pad to even length */
349
349
        if (fs->bytes & 0x1)
350
350
                fwrite(&zero, 1, 1, s->f);
359
359
        int bytes = WAV_BUF_SIZE;       /* in bytes */
360
360
        off_t here;
361
361
        /* Send a frame from the file to the appropriate channel */
362
 
        struct wav_desc *fs = (struct wav_desc *)s->private;
 
362
        struct wav_desc *fs = (struct wav_desc *)s->_private;
363
363
 
364
364
        here = ftello(s->f);
365
365
        if (fs->maxlen - here < bytes)          /* truncate if necessary */
411
411
        int x;
412
412
        short tmp[8000], *tmpi;
413
413
        float tmpf;
414
 
        struct wav_desc *s = (struct wav_desc *)fs->private;
 
414
        struct wav_desc *s = (struct wav_desc *)fs->_private;
415
415
        int res;
416
416
 
417
417
        if (f->frametype != AST_FRAME_VOICE) {