~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to sbc/sbcenc.c

ImportĀ upstreamĀ versionĀ 4.81

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *
3
3
 *  Bluetooth low-complexity, subband codec (SBC) encoder
4
4
 *
5
 
 *  Copyright (C) 2004-2009  Marcel Holtmann <marcel@holtmann.org>
 
5
 *  Copyright (C) 2008-2010  Nokia Corporation
 
6
 *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
6
7
 *
7
8
 *
8
9
 *  This program is free software; you can redistribute it and/or modify
48
49
{
49
50
        struct au_header au_hdr;
50
51
        sbc_t sbc;
51
 
        int fd, size, encoded, srate, codesize, nframes;
 
52
        int fd, size, srate, codesize, nframes;
 
53
        ssize_t encoded;
52
54
        ssize_t len;
53
55
 
54
56
        if (sizeof(au_hdr) != 24) {
171
173
                                &encoded);
172
174
                        if (len != codesize || encoded <= 0) {
173
175
                                fprintf(stderr,
174
 
                                        "sbc_encode fail, len=%zd, encoded=%d\n",
175
 
                                        len, encoded);
 
176
                                        "sbc_encode fail, len=%zd, encoded=%lu\n",
 
177
                                        len, (unsigned long) encoded);
176
178
                                break;
177
179
                        }
178
180
                        size -= len;
204
206
static void usage(void)
205
207
{
206
208
        printf("SBC encoder utility ver %s\n", VERSION);
207
 
        printf("Copyright (c) 2004-2009  Marcel Holtmann\n\n");
 
209
        printf("Copyright (c) 2004-2010  Marcel Holtmann\n\n");
208
210
 
209
211
        printf("Usage:\n"
210
212
                "\tsbcenc [options] file(s)\n"