Author: richard
Date: Fri Feb  6 03:48:37 2009
New Revision: 4062

URL: http://svn.slimdevices.com?rev=4062&root=Jive&view=rev
Log:
 r4...@harrypotter (orig r4052):  chris | 2009-02-05 23:01:28 +0000
 Initial checkin of new smoke test scripts
 
 r4...@harrypotter (orig r4053):  chris | 2009-02-05 23:10:13 +0000
 fixed typos
 
 r4...@harrypotter (orig r4054):  chris | 2009-02-05 23:20:37 +0000
 Matt Wise tells me these scripts should go in a different project.  
 Sigh.
 
 r4...@harrypotter (orig r4058):  richard | 2009-02-06 11:37:19 +0000
 Bug: N/A
 Description:
 Report firmware version to SC.
 
 
 r4...@harrypotter (orig r4059):  richard | 2009-02-06 11:38:22 +0000
 Bug: N/A
 Description:
 Modified http user-agent to allow the device type to be determined by SN 
(jive, desktop, etc).
 
 
 r4...@harrypotter (orig r4060):  richard | 2009-02-06 11:43:48 +0000
 Bug: N/A
 Description:
 Fix test tones, add a left channel only tone.
 
 
 r4...@harrypotter (orig r4061):  richard | 2009-02-06 11:46:11 +0000
 Bug: N/A
 Description:
 Cleanup device id code.
 
 

Modified:
    7.4/branches/pango/   (props changed)
    
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/PlaybackApplet.lua
    
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/strings.txt
    7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua
    7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua
    
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua
    7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode.h
    
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_tones.c

Propchange: 7.4/branches/pango/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Feb  6 03:48:37 2009
@@ -4,7 +4,7 @@
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.2/trunk:2921
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/private-branches/jive-refresh:3653
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/trunk:3993
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:4044
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:4061
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/PlaybackApplet.lua
URL: 
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/PlaybackApplet.lua?rev=4062&root=Jive&r1=4061&r2=4062&view=diff
==============================================================================
--- 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/PlaybackApplet.lua
 (original)
+++ 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/PlaybackApplet.lua
 Fri Feb  6 03:48:37 2009
@@ -12,7 +12,7 @@
 local SlimServer    = require("jive.slim.SlimServer")
 local LocalPlayer   = require("jive.slim.LocalPlayer")
 
-local Decode        = require("squeezeplay.decode")
+local decode        = require("squeezeplay.decode")
 
 local Framework     = require("jive.ui.Framework")
 local Checkbox      = require("jive.ui.Checkbox")
@@ -137,7 +137,7 @@
        window:addWidget(menu)
 
        window:addTimer(1000, function()
-                       local status = Decode:status()
+                       local status = decode:status()
 
                        values[1]:setValue(decoders[string.char(status.decoder 
or 0)] or "?")
                        values[2]:setValue(string.format('%0.1f%%', 
status.decodeFull / status.decodeSize * 100))
@@ -159,52 +159,73 @@
                { text = self:string("MULTITONE"),
                  sound = "WINDOWSHOW",
                  callback = function(event)
-                       Decode:start(
+                       decode:flush()
+                       decode:start(
                                string.byte('t'), 0, 0, 0, 0, 0, 1
                        )
-                       Decode:resume()
-                 end
-               },
-               { text = self:string("SINE_44.1k"),
-                 sound = "WINDOWSHOW",
-                 callback = function(event)
-                       Decode:start(
+                       decode:resumeDecoder()
+                       decode:resumeAudio()
+                 end
+               },
+               { text = self:string("LEFT_CHANNEL"),
+                 sound = "WINDOWSHOW",
+                 callback = function(event)
+                       decode:flush()
+                       decode:start(
+                               string.byte('t'), 0, 0, 0, 0, 0, 2
+                       )
+                       decode:resumeDecoder()
+                       decode:resumeAudio()
+                 end
+               },
+               { text = self:string("SINE_44_1K"),
+                 sound = "WINDOWSHOW",
+                 callback = function(event)
+                       decode:flush()
+                       decode:start(
                                string.byte('t'), 0, 0, 0, 0, 0, 10
                        )
-                       Decode:resume()
+                       decode:resumeDecoder()
+                       decode:resumeAudio()
                  end
                },
                { text = self:string("SINE_48k"),
                  sound = "WINDOWSHOW",
                  callback = function(event)
-                       Decode:start(
+                       decode:flush()
+                       decode:start(
                                string.byte('t'), 0, 0, 0, 0, 0, 11
                        )
-                       Decode:resume()
-                 end
-               },
-               { text = self:string("SINE_88.2K"),
-                 sound = "WINDOWSHOW",
-                 callback = function(event)
-                       Decode:start(
+                       decode:resumeDecoder()
+                       decode:resumeAudio()
+                 end
+               },
+               { text = self:string("SINE_88_2K"),
+                 sound = "WINDOWSHOW",
+                 callback = function(event)
+                       decode:flush()
+                       decode:start(
                                string.byte('t'), 0, 0, 0, 0, 0, 12
                        )
-                       Decode:resume()
+                       decode:resumeDecoder()
+                       decode:resumeAudio()
                  end
                },
                { text = self:string("SINE_96K"),
                  sound = "WINDOWSHOW",
                  callback = function(event)
-                       Decode:start(
+                       decode:flush()
+                       decode:start(
                                string.byte('t'), 0, 0, 0, 0, 0, 13
                        )
-                       Decode:resume()
+                       decode:resumeDecoder()
+                       decode:resumeAudio()
                  end
                },                      
                { text = self:string("SINE_STOP"),
                  sound = "WINDOWSHOW",
                  callback = function(event)
-                       Decode:stop()
+                       decode:stop()
                  end
                },                      
        })

Modified: 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/strings.txt
URL: 
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/strings.txt?rev=4062&root=Jive&r1=4061&r2=4062&view=diff
==============================================================================
--- 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/strings.txt
 (original)
+++ 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/Playback/strings.txt
 Fri Feb  6 03:48:37 2009
@@ -134,7 +134,11 @@
        NO      Multitone
        SV      Flera toner
 
-SINE_44        DA      Sinus 44,1 k
+LEFT_CHANNEL
+       EN      Left channel
+
+SINE_44_1K
+       DA      Sinus 44,1 k
        DE      Sinus 44.1k
        EN      Sine 44.1k
        ES      Seno 44,1 kHz
@@ -144,7 +148,6 @@
        NL      Sinus 44.1 k
        NO      Sinus 44.1k
        SV      Sinus 44,1 k
-.1k
 
 SINE_48k
        DA      Sinus 48 k
@@ -158,7 +161,8 @@
        NO      Sinus 48k
        SV      Sinus 48 k
 
-SINE_88        DA      Sinus 88,2 k
+SINE_88_2K
+       DA      Sinus 88,2 k
        DE      Sinus 88.2k
        EN      Sine 88.2k
        ES      Seno 88,2 kHz
@@ -168,7 +172,6 @@
        NL      Sinus 88.2 k
        NO      Sinus 88.2k
        SV      Sinus 88,2 k
-.2K
 
 SINE_96K
        DA      Sinus 96 k

Modified: 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua
URL: 
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua?rev=4062&root=Jive&r1=4061&r2=4062&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua 
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SlimProto.lua 
Fri Feb  6 03:48:37 2009
@@ -124,7 +124,6 @@
 
 local opcodes = {
        HELO = function(self, data)
-               assert(data.revision)
                assert(data.mac)
                assert(data.uuid)
 
@@ -146,7 +145,7 @@
 
                return {
                        packNumber(data.deviceID or DEVICEID, 1),
-                       packNumber(data.revision, 1),
+                       packNumber(0, 1),
                        table.concat(macp),
                        table.concat(uuidp),
                        packNumber(wlanList, 2),
@@ -305,7 +304,7 @@
 -- address. The heloPacket is sent on server (re)connection.
 function __init(self, jnt, heloPacket)
        -- validate the heloPacket
-       assert(heloPacket.revision)
+       assert(heloPacket.version)
        assert(heloPacket.mac)
        assert(heloPacket.uuid)
        assert(heloPacket.model)
@@ -324,6 +323,7 @@
 
        obj:capability("Model", obj.heloPacket.model)
        obj:capability("ModelName", obj.heloPacket.modelName)
+       obj:capability("Firmware", string.gsub(obj.heloPacket.version, '%s', 
'-'))
 
        obj.statusCallback = _defaultStatusCallback
 

Modified: 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua
URL: 
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua?rev=4062&root=Jive&r1=4061&r2=4062&view=diff
==============================================================================
--- 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua 
(original)
+++ 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua 
Fri Feb  6 03:48:37 2009
@@ -41,6 +41,8 @@
 local socket      = require("socket")
 local mime        = require("mime")
 local ltn12       = require("ltn12")
+
+local System      = require("jive.System")
 
 local Task        = require("jive.ui.Task")
 
@@ -253,7 +255,14 @@
 
        -- default set
        local headers = {
-               ["User-Agent"] = 'Jive/' .. JIVE_VERSION,
+               ["User-Agent"] = table.concat({
+                       'SqueezePlay-',
+                       System:getMachine(),
+                       '/',
+                       string.gsub(JIVE_VERSION, "%s", "-"),
+                       ' (',
+                       System:getArch(),
+                       ')'})
        }
        
        local ip, port = self:t_getAddressPort()

Modified: 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua
URL: 
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua?rev=4062&root=Jive&r1=4061&r2=4062&view=diff
==============================================================================
--- 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua 
(original)
+++ 
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/LocalPlayer.lua 
Fri Feb  6 03:48:37 2009
@@ -17,8 +17,10 @@
 local debug          = require("jive.utils.debug")
 local log            = require("jive.utils.log").logger("player")
 
+local JIVE_VERSION   = jive.JIVE_VERSION
 
 -- can be overridden by hardware specific classes
+local DEVICE_ID      = 12
 local DEVICE_MODEL   = "squeezeplay"
 local DEVICE_NAME    = "SqueezePlay"
 
@@ -27,16 +29,11 @@
 oo.class(_M, Player)
 
 
-local device2id = {
-       ["controller"] = 9,
-       ["squeezeplay"] = 12,
-}
-
-
 -- class method to set the device type
 function setDeviceType(self, model, name)
         assert(device2id[model])
 
+        DEVICE_ID = 9
         DEVICE_MODEL = model
         DEVICE_NAME = name or model
 end
@@ -45,13 +42,10 @@
 function __init(self, jnt, playerId, uuid)
        local obj = oo.rawnew(self, Player(jnt, playerId))
 
-       local deviceid = device2id[DEVICE_MODEL]
-       assert(deviceid)
-
        obj.slimproto = SlimProto(jnt, {
                opcode = "HELO",
-               deviceID = deviceid,
-               revision = 0,
+               deviceID = DEVICE_ID
+               version = JIVE_VERSION,
                mac = obj.id,
                uuid = uuid,
                model = DEVICE_MODEL,

Modified: 
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode.h
URL: 
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode.h?rev=4062&root=Jive&r1=4061&r2=4062&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode.h 
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode.h 
Fri Feb  6 03:48:37 2009
@@ -24,6 +24,7 @@
 
 #define TESTTONES_OFF                                  0
 #define TESTTONES_MULTITONE                            1
+#define TESTTONES_LEFT_CHANNEL                         2
 #define TESTTONES_SINE40_44100                         10
 #define TESTTONES_SINE40_48000                         11
 #define TESTTONES_SINE40_88200                         12

Modified: 
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_tones.c
URL: 
http://svn.slimdevices.com/7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_tones.c?rev=4062&root=Jive&r1=4061&r2=4062&view=diff
==============================================================================
--- 
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_tones.c 
(original)
+++ 
7.4/branches/pango/squeezeplay/src/squeezeplay/src/audio/decode/decode_tones.c 
Fri Feb  6 03:48:37 2009
@@ -26,6 +26,7 @@
 
 #define DECODE_TONES_MODE_SINE40       1
 #define DECODE_TONES_MODE_MULTITONE    2
+#define DECODE_TONES_MODE_LEFT_CHANNEL 3
 
 
 #define INVERT24(n) ( ((n & 0x00ffffff)==0x00800000) ? \
@@ -115,7 +116,8 @@
                                *write_pos++ = sample << 8;
                        }
                        break;
-       
+
+               case DECODE_TONES_MODE_LEFT_CHANNEL:
                case DECODE_TONES_MODE_MULTITONE:
                        for (i = 0; i < BLOCKSIZE; i+=2) {
 
@@ -123,7 +125,7 @@
                                        self->count = 0;
                                        
                                        self->tones_multitone_test++;
-                                       if (self->tones_multitone_test > 15) {
+                                       if ((self->mode == 
DECODE_TONES_MODE_LEFT_CHANNEL && self->tones_multitone_test > 5) || 
self->tones_multitone_test > 15) {
                                                self->tones_multitone_test = 1;
                                        }
                                }
@@ -199,6 +201,10 @@
            self->mode = DECODE_TONES_MODE_MULTITONE;
            self->sample_rate = 44100;
            break;
+       case TESTTONES_LEFT_CHANNEL:
+           self->mode = DECODE_TONES_MODE_LEFT_CHANNEL;
+           self->sample_rate = 44100;
+           break;
        case TESTTONES_SINE40_44100:
            self->mode = DECODE_TONES_MODE_SINE40;
            self->sample_rate = 44100;

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to