OSS programming help

This is a discussion on OSS programming help within the Linux Programming forums, part of the Platform Specific Boards category; Im writing an mp3 player for the console (not has nice has mpg123), and I have a funcion volume, which ...

  1. #1
    Registered User unixOZ's Avatar
    Join Date
    Feb 2002
    Posts
    91

    Question OSS programming help

    Im writing an mp3 player for the console (not has nice has mpg123), and I have a funcion volume, which regulates the /dev/mixer volume. I get the following error:

    vol.c: In function `volume':
    vol.c:60: invalid operands to binary <<

    In that line I have:

    lev = (rightchannel << 8) + leftchannel;

    All the variables are integers

    Thank you

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    I've recently done some programming with wav files, and in those cases I used int for the channels.

    starX
    www.axisoftime.com

  3. #3
    Registered User unixOZ's Avatar
    Join Date
    Feb 2002
    Posts
    91
    Yes, I read that the channels have to be integers, thats why I declared the has such

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    Sorry, didn't see that at the bottom of your original post. If you drop the file in, I'll take a look at it and see if I can reproduce your results and perhaps figure out what the problem is, but trying to do so with a snippet of code is a little beyond me.

    starX
    www.axisoftime.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Making a Fat32 Partition for both OS's
    By Stan100 in forum Tech Board
    Replies: 3
    Last Post: 10-17-2004, 05:13 PM
  2. Oss = ?
    By compiler in forum Linux Programming
    Replies: 1
    Last Post: 06-18-2003, 11:23 PM
  3. menu to switch between OS's
    By DavidP in forum Tech Board
    Replies: 3
    Last Post: 12-22-2002, 02:24 AM
  4. I need a lil help with OS's
    By civix in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 07-18-2002, 11:54 AM
  5. Linux OS's
    By JasonLikesJava in forum Linux Programming
    Replies: 23
    Last Post: 07-13-2002, 02:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21