Getting the sound volume settings in 10.2

What I am trying to accomplish is:

  1. During the session of the program the user is allowed to set sound volumes by adjusting various sliders.
  2. At EOJ the program should set the sound volume back to where it was before.
    something like this:

if not (OSversion = "10.2") then
      get volume settings
      set saveVolume to result
      .
      -- the users can now set various sound volumes with sliders
      .	
      set volume output volume saveVolume  -- EOJ, reset
end if


I tried to run the (in 10.3) compiled object in 10.2. This does not work (no sound at all)
I cannot compile the code above in 10.2 because then I get syntax errors.

So I seem to have three options:

  1. The program cannot run in 10.2 just because I can’t get the system sound volume
  2. The program has to be split in two versions: one for 10.2 and one for ?10.3.
  3. I remove the code from version 10.3 so that is can also run in 10.2.
    That means that the user cannot set the volume other then to push push the buttons on the keyboard and that is exactly what I don’t want.

Neither of these options is very attractive so I would like to ask: Is there some ‘call method’ in xcode to get the system sound volume? (in 10.2) because that is in fact all I really need.

Thanks,

John dh