Why Doesn't the XIRR function work?

In Excel if you have 5 records from a1:b5 then XIRR looks like this:
XIRR(A1:A5, B1:B5) you get a nice neat answer like .35
Here is a version that works in Crystal that would require manual entry of any new quarters numbers and dates-- and if you plug this into Crystal it works:
(XIRR([1000000,-100000,-100000,-100000,-100000,10277.49,-100000], [DateValue(1999,2,1),DateValue(1999,3,1),DateValue(1999,6,1), DateValue(1999,12,1),DateValue(2000,3,1),DateValue(2000,6,1),DateValue(2000,9,1)]))*.100
You do get a nice answer of something like .035.  But this is all done manually and I need it to function automatically when the report is refreshed.
So you have a range for the currency and a range for the date fields. I need to simulate this in crystal. Crystal has an XIRR function, and with the arrays, I should be able to fill in the range, but am having difficulty getting it to work.
After building the arrays, I made another formula to combine the arrays in the XIRR formula.
I am down to this error now after getting this formula this far  --
"Numerical method did not converge; try another value for guess."
Here's where I am with the formula, although they don't want to use the guess part of the XIRR function - they just want to use the XIRR(number/currency, date).  Maybe you could pass this on too?:
/{@Reset} for the group header (NOT using a repeated group header):
whileprintingrecords;
numbervar array x := 0;
datevar array y := date(0,0,0);
numbervar i := 0;
numbervar j := 0;
//{@accum} for the detail section:
whileprintingrecords;
numbervar array x;
datevar array y;
numbervar i := i + 1;
numbervar j := count({table.groupfield},{table.groupfield});
if i <= j then (
redim preserve x[j];
redim preserve y[j];
x<i> := tonumber({table.currency});
y<i> := datevalue({table.datetime})
//{@xirr calc} to be placed in the group footer:
whileprintingrecords;
numbervar array x;
datevar array y;
xirr(x,y)
The array works correctly.  So why do I get that error and why doesn't the XIRR formula work like they say it should?  Has anyone used this successfully in Crystal--maybe you could shed some light?
Thanks!

Hi,
I am receiving that same error when the last item in the array is 0, otherwise all works perfectly.
When I run the same group of numbers and dates in Excel it returns without issue.
-265500.00,-690000.00,-570000.00,16814.25,-855000.00,-619500.00,55293.46,30411.40,15183.76,  0.00
01-25-2007,03-06-2007,05-02-2007,06-29-2007,08-01-2007,08-24-2007,09-17-2007,03-14-2008,05-28-2008,03-31-2010
=XIRR(A2:J2,A1:J1,-0.1)
Is there a known bug in Crystal's XIRR function when the last value is 0? 
Or a hot-fix that will repair this?
Thanks in advance,
Gary
PS. I am using Crystal XI Product Version: 11.0.0.2495

Similar Messages

  • Why doesn't the "back" button work all the time in Safari?

    Why doesn't the "back" button work all the time in Safari?

    thanks for the reply. You prompted me to check and I realised it wasn't installed on my test laptop and opening in Microsoft Reader. I've installed it now and it works.
    My next challenge is to prevent the mailto: command opening Microsoft Mail instead of Outlook, but I guess every user will have a different default.
    Thank you

  • Why doesn't the CC app work properly?

    I've been using Creative Cloud for some time now and am really loving it, however I must say it is a source of annoyance that the Creative Cloud app just doesn't work properly.
    Firstly, I used it initially to download all my apps, then after an update those apps no longer appeared in the "Apps" list. Now only those that have been installed since that update appear in this list. Why doesn't the "Apps" list display all of the Adobe CC apps that I have installed on my computer?
    Why does it keep reinstalling fonts? I'm always getting "Lush Script Regular" and other fonts being added.
    It regularly comes up telling me that Dreamweaver and Premiere Pro need to be updated, but always I get an error, then the update request disappears.
    I'm regularly getting 4 files that it can't sync - even though they are the same files as others in the folder. If nothing else, why can't I say "Great, got the message". Also, why is the error message just "due to server error" with no advice on how to resolve it? Why is there a server error on only these 4 files?
    It seems to me there are still some teething issues with the CC app, but what I don't understand is why they aren't being resolved much faster, given that this is the portal to the service.
    Of course, given Adobe I doubt I'll get satisfactory answers – a little jaded with their responses. Anyway, thought I'd at least post the questions.  

    Questapo I am sorry you have been facing difficulties with your Creative Cloud experience.  I don't believe it will be possible to address all of your concerns in one discussion.  I would not be surprised if at least three of the issues are related to the same root cause.
    First in order for the applications to be visible are you regularly needing to delete the OPM.db file?  You can find this listed as solution 2 in CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.

  • Why doesn't the 'Reanalyze' button work?

    After accidentally syncing both the Upright Mode and the Upright Transforms (instead of just the mode) from 1 photo to approximately 200 other photos, I noticed something quite strange.
    When selecting the 'Auto' upright mode on any of the other pictures, the transformation was done using data from the original photo.
    When realising that I'd synced that transformation data across to a load of photos that it didn't apply to, I tried pressing the 'Reanalyze' button. This seems to have no effect - the images are still incorrectly transformed.
    The only solution was to manually reset every synced photo to its imported state (although I suppose I could have undone the sync operation, but I only realised this after doing other changes). After doing this, the transformations work correctly.
    Perhaps I have misunderstood what the button does, but if I have, then I can't see how you are meant to resolve this problem

    Apple doesn't support web based email clients. Why not use the Mail app that's pre installeed on your Mac?

  • Why doesn't my XMLTable function work?

    Hi,
    I'm trying to read through my XML document using a XMLTable function, because a repetition of elements might occur. I wrote a SQL-script to test this function, but it does not give me the desired output. This is my script. I use a dummy table PETER_XML to pass the value to the XMLTable function. I would rather have done this directly with a PL/SQL variable, but that did not work.
    CREATE TABLE PETER_XML (AVY XMLTYPE);
    set serveroutput on size 100000
    set echo on
    set feedback on
    declare
    cursor c_avy is
    SELECT XMLRESPONSE."DepartureStation" DEPARTURE,
           XMLRESPONSE."FlightNumber"     FLIGHTNR
    FROM   PETER_XML,
           XMLTABLE(XMLNameSpaces('http://schemas.navitaire.com/WebServices' as "web",
                                  'http://schemas.xmlsoap.org/soap/envelope/' as "soapenv",
                                  'http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService' as "book",
                                  'http://schemas.navitaire.com/WebServices/DataContracts/Booking' as "book1",
                                  'http://schemas.microsoft.com/2003/10/Serialization/Arrays' as "arr",
                                  'http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations' as "enum",
                                  'http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService' as "ns0",
                                  'http://schemas.navitaire.com/WebServices/DataContracts/Booking' as "ns1" ),
                    '//GetAvailabilityRequest/TripAvailabilityRequest/AvailabilityRequests/AvailabilityRequest'
                    PASSING PETER_XML.AVY
                    COLUMNS
                      "DepartureStation" varchar2(3) PATH 'DepartureStation',
                      "FlightNumber"     varchar2(4) PATH 'FlightNumber'
                   ) XMLRESPONSE;
    l_response clob := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://schemas.navitaire.com/WebServices" xmlns:book="http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService" xmlns:book1="http://schemas.navitaire.com/WebServices/DataContracts/Booking" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:enum="http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">
       <soapenv:Header>
          <web:Signature>bnuOiHCVb3k=|Gx+eTRcZ5ABozAy8MosBFwagyUw7zrRXf1iprmw9Q4W17wt8SDpjYV2HwZRGIHYtE46UFBJw/aFyKVqjToEAfSTfh7cePm4r9JJwcIveDc75NuxnzoY14pKC+WLYDzE0MaALra4i/tI=</web:Signature>
          <web:ContractVersion>340</web:ContractVersion>
       </soapenv:Header>
       <soapenv:Body>
              <ns0:GetAvailabilityRequest xmlns:ns0 = "http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService">
                       <ns1:TripAvailabilityRequest xmlns:ns1 = "http://schemas.navitaire.com/WebServices/DataContracts/Booking">
                                 <ns1:AvailabilityRequests>
                                          <ns1:AvailabilityRequest>
                                                    <ns1:DepartureStation>AMS</ns1:DepartureStation>
                                                    <ns1:ArrivalStation>CTA</ns1:ArrivalStation>
                                                    <ns1:BeginDate>2013-07-13T00:00:00</ns1:BeginDate>
                                                    <ns1:EndDate>2013-07-13T00:00:00</ns1:EndDate>
                                                    <ns1:CarrierCode>HV</ns1:CarrierCode>
                                                    <ns1:FlightNumber> 547</ns1:FlightNumber>
                                                    <ns1:FlightType>All</ns1:FlightType>
                                                    <ns1:PaxCount>1</ns1:PaxCount>
                                                    <ns1:Dow>Daily</ns1:Dow>
                                                    <ns1:CurrencyCode>EUR</ns1:CurrencyCode>
                                                    <ns1:DisplayCurrencyCode>EUR</ns1:DisplayCurrencyCode>
                                                    <!--ns1:SourceOrganization>COO</ns1:SourceOrganization-->
                                                    <ns1:MaximumConnectingFlights>0</ns1:MaximumConnectingFlights>
                                                    <ns1:AvailabilityFilter>Default</ns1:AvailabilityFilter>
                                                    <ns1:ProductClassCode>NG</ns1:ProductClassCode>
                                                    <ns1:SSRCollectionsMode>None</ns1:SSRCollectionsMode>
                                                    <ns1:InboundOutbound>Both</ns1:InboundOutbound>
                                                    <ns1:NightsStay>0</ns1:NightsStay>
                                                    <ns1:IncludeAllotments>true</ns1:IncludeAllotments>
                                                    <ns1:FareTypes>
                                                              <ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays">T</ns2:string>
                                                    </ns1:FareTypes>
                                                    <ns1:PaxPriceTypes>
                                                              <ns1:PaxPriceType>
                                                                       <ns1:PaxType>ADT</ns1:PaxType>
                                                              </ns1:PaxPriceType>
                                                    </ns1:PaxPriceTypes>
                                                    <ns1:JourneySortKeys>
                                                              <ns2:JourneySortKey xmlns:ns2 = "http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">EarliestDeparture</ns2:JourneySortKey>
                                                    </ns1:JourneySortKeys>
                                                    <ns1:IncludeTaxesAndFees>false</ns1:IncludeTaxesAndFees>
                                                    <ns1:FareRuleFilter>Default</ns1:FareRuleFilter>
                                                    <ns1:LoyaltyFilter>MonetaryOnly</ns1:LoyaltyFilter>
                                                    <ns1:TravelClassCodeList>
                                                              <ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays">Y</ns2:string>
                                                    </ns1:TravelClassCodeList>
                                          </ns1:AvailabilityRequest>
                                 </ns1:AvailabilityRequests>
                                 <ns1:LoyaltyFilter>MonetaryOnly</ns1:LoyaltyFilter>
                       </ns1:TripAvailabilityRequest>
              </ns0:GetAvailabilityRequest>
       </soapenv:Body>
    </soapenv:Envelope>';
    begin
    dbms_output.put_line ('Start');
    insert into peter_xml (avy) values ( XMLTYPE(l_response) );
    dbms_output.put_line ('Insert processed ' || to_char(sql%rowcount) || ' rows.' );
    for r_avy in c_avy loop
       dbms_output.put_line ( 'Departure ' || r_avy.departure || ' Flightno. ' || r_avy.flightnr );
    end loop;
    end;
    rollback;
    The script runs fine, but the problem is that I do not get any output form the cursor for-loop. When I address the elements using 'ns1:etc' I get an error, which suggests that the function is actually reading the XML. Since it gave no output, I started including all these XMLNameSpaces.
    Can anyone let me know what I'm missing?
    And if I can pass the value with a PL/SQL variable, it would save me the use of a dummy table. That would be nice.
    Thanks in advance.
    Peter

    Hi Peter,
    Since it gave no output, I started including all these XMLNameSpaces.
    All these namespaces have meaning, don't include them blindly, but if you do, use them.
    The main XQuery expression doesn't reference any of the necessary namespaces.
    Here's a simplified version that gives the expected output.
    Please note that I only use the namespaces I need to resolve the XQuery :
    declare
      cursor c_avy (p_xmlresponse in xmltype) is
        select x.DEPARTURE
             , x.FLIGHTNR
        from xmltable(
               xmlnamespaces(
                 'http://schemas.xmlsoap.org/soap/envelope/' as "soap"
               , 'http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService' as "ns0"
               , 'http://schemas.navitaire.com/WebServices/DataContracts/Booking' as "ns1"
             , '/soap:Envelope/soap:Body/ns0:GetAvailabilityRequest/ns1:TripAvailabilityRequest/ns1:AvailabilityRequests/ns1:AvailabilityRequest'
               passing p_xmlresponse
               columns
                 DEPARTURE varchar2(3) path 'ns1:DepartureStation'
               , FLIGHTNR  varchar2(4) path 'ns1:FlightNumber'
             ) x ;
      l_response clob := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://schemas.navitaire.com/WebServices" xmlns:book="http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService" xmlns:book1="http://schemas.navitaire.com/WebServices/DataContracts/Booking" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:enum="http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">
       <soapenv:Header>
          <web:Signature>bnuOiHCVb3k=|Gx+eTRcZ5ABozAy8MosBFwagyUw7zrRXf1iprmw9Q4W17wt8SDpjYV2HwZRGIHYtE46UFBJw/aFyKVqjToEAfSTfh7cePm4r9JJwcIveDc75NuxnzoY14pKC+WLYDzE0MaALra4i/tI=</web:Signature>
          <web:ContractVersion>340</web:ContractVersion>
       </soapenv:Header>
       <soapenv:Body>
              <ns0:GetAvailabilityRequest xmlns:ns0 = "http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService">
                       <ns1:TripAvailabilityRequest xmlns:ns1 = "http://schemas.navitaire.com/WebServices/DataContracts/Booking">
                                 <ns1:AvailabilityRequests>
                                          <ns1:AvailabilityRequest>
                                                    <ns1:DepartureStation>AMS</ns1:DepartureStation>
                                                    <ns1:ArrivalStation>CTA</ns1:ArrivalStation>
                                                    <ns1:BeginDate>2013-07-13T00:00:00</ns1:BeginDate>
                                                    <ns1:EndDate>2013-07-13T00:00:00</ns1:EndDate>
                                                    <ns1:CarrierCode>HV</ns1:CarrierCode>
                                                    <ns1:FlightNumber> 547</ns1:FlightNumber>
                                                    <ns1:FlightType>All</ns1:FlightType>
                                                    <ns1:PaxCount>1</ns1:PaxCount>
                                                    <ns1:Dow>Daily</ns1:Dow>
                                                    <ns1:CurrencyCode>EUR</ns1:CurrencyCode>
                                                    <ns1:DisplayCurrencyCode>EUR</ns1:DisplayCurrencyCode>
                                                    <!--ns1:SourceOrganization>COO</ns1:SourceOrganization-->
                                                    <ns1:MaximumConnectingFlights>0</ns1:MaximumConnectingFlights>
                                                    <ns1:AvailabilityFilter>Default</ns1:AvailabilityFilter>
                                                    <ns1:ProductClassCode>NG</ns1:ProductClassCode>
                                                    <ns1:SSRCollectionsMode>None</ns1:SSRCollectionsMode>
                                                    <ns1:InboundOutbound>Both</ns1:InboundOutbound>
                                                    <ns1:NightsStay>0</ns1:NightsStay>
                                                    <ns1:IncludeAllotments>true</ns1:IncludeAllotments>
                                                    <ns1:FareTypes>
                                                              <ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays">T</ns2:string>
                                                    </ns1:FareTypes>
                                                    <ns1:PaxPriceTypes>
                                                              <ns1:PaxPriceType>
                                                                       <ns1:PaxType>ADT</ns1:PaxType>
                                                              </ns1:PaxPriceType>
                                                    </ns1:PaxPriceTypes>
                                                    <ns1:JourneySortKeys>
                                                              <ns2:JourneySortKey xmlns:ns2 = "http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">EarliestDeparture</ns2:JourneySortKey>
                                                    </ns1:JourneySortKeys>
                                                    <ns1:IncludeTaxesAndFees>false</ns1:IncludeTaxesAndFees>
                                                    <ns1:FareRuleFilter>Default</ns1:FareRuleFilter>
                                                    <ns1:LoyaltyFilter>MonetaryOnly</ns1:LoyaltyFilter>
                                                    <ns1:TravelClassCodeList>
                                                              <ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays">Y</ns2:string>
                                                    </ns1:TravelClassCodeList>
                                          </ns1:AvailabilityRequest>
                                 </ns1:AvailabilityRequests>
                                 <ns1:LoyaltyFilter>MonetaryOnly</ns1:LoyaltyFilter>
                       </ns1:TripAvailabilityRequest>
              </ns0:GetAvailabilityRequest>
       </soapenv:Body>
    </soapenv:Envelope>';
    begin
      for r_avy in c_avy (xmltype(l_response)) loop
        dbms_output.put_line ( 'Departure ' || r_avy.departure || ' Flightno. ' || r_avy.flightnr );
      end loop;
    end;
    Indeed, you don't need an intermediate table for this requirement. However, and depending on your db version, storing the XML in a binary XMLType table may improve performance dramatically.
    For small contents, you probably won't see a difference between the two approaches, but just so you know in case you have to deal with big XMLs in the future.

  • Why doesn't the alt tag work in firefox to open a description of an image on mouseover

    In IE, when I roll my mosue over an image, it gives a tooltip description of the image contained in the html alt tag. Why doesn't this work in Firefox?

    The "alt" tag is meant to show text when the image isn't loaded, the "title" tag is meant for a description of an image on cursor hover. IE has been doing that wrong for many years, where Firefox follows W3C standards. A properly coded webpage should have both "alt" and "title" tags.

  • Why doesn't the HadoCamera app work?

    I just got this photo effects app called "HadoCamera". For some reason every time i open it on my iPhone theres just a black screen. Does anyone know why?

    Ask the app developer or look at their support site.

  • Why doesn't the virtual keyboard work with firefox on my dell venue 8 pro windows 8.1 tablet?

    When I try to enter text in any text-entry box, i.e, in the url , search, or on a website, the virtual keyboard doesn't activate. I have to manually activate and deactivate it. It works for Google Chrome, but sadly not for firefox, my preferred browser. The tablet is up-to-date with the latest drivers and updates.

    Thanks for the reply. No, it's the virtual keyboard that is integrated into window 8.1. I haven't installed any 3rd party keyboards

  • Why doesn't the Wi-Fi work on my IPod

    My IPod is connected to my wifi but it doesn't actually work.

    Does the iPod connect to other networks?
    Does the iPod see the network?
    Any error messages?
    Do other devices now connect?
    Did the iPod connect before?
    Try the following to rule out a software problem:                 
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on the router
    - Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - Wi-Fi: Unable to connect to an 802.11n Wi-Fi network
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    If still problem make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar

  • Why doesn't the import tool work in Thunderbird 24.7.0?

    Hello!
    I'm running Thunderbird 24.7.0, on Mageia Linux 4.1, with the KDE4 desktop. Thunderbird was installed from the Mageia repositories using their package manager, rpmdrake. I have many filters that I have created on earlier versions of Thunderbird, and wish to import them. However, when I go to the "tools" menu, and pick "import", and then choose the radio button to import "filters", I get a message: "Choose the file you would like to import", but below that, is only a blank white box. I cannot click on it to get a cursor, and the "next" button is grayed-out and non-functional. Only the "back" and "cancel" buttons work.
    The filters I wish to import are simple text files, created in Thunderbird, and saved to back-up. It appears that perhaps the UI is breaking at the point where it should let me browse for files to import. Is this possibly something that has gone wrong with the Mageia build of Thunderbird? -Or is this a common issue? -And is there a fix for it? Thank you!

    import only imports third party mail clients. It does not transfer profile data or parts of it from installation to installation.
    Simply copy the msgfilterrules.dat file yourself

  • Why doesn't the f4 key work on the mac book pro?

    Hi i wanted to know a little situation about my Mac Book pro may someone help me? it is about the Key F4 i wanted to know why when i click it my launchpd does not open. Is there something wrong with my mac book or its just that i have to fix something on my system prefences? Please help me and respond to me.
    Thank you.

    Try fn+F4
    If that works, in System Preferences, take a look at:

  • Why doesn't the FTP upload work?

    The FTP upload is not working on Muse... This problem started since the last software update, it stops the upload somewhere and doesn't continue...

    Hi,
    It doesn't give me any error, it just stops, usually at 63% or 80%
    Thank you!
    Best Regards

  • Why doesn't the #target directive work in InDesign CC scripting?

    I have a script which works fine when run from ExtendScript Toolkit on both InDesign CS4 and InDesign CC -- but I am unable to specifically target CC using the #target directive.
    At the top of my .jsx file, if I put:
    #target "InDesign-6.0"
    Then the script will open InDesign CS4 and run the script. However, if I put:
    #target "InDesign-9.0"
    It throws a dialog error "InDesign-9.0" is undefined! I've tried 8.0 and 9.1 just in case I had the version number wrong; nothing works.
    Now, it is true that I can get it to work by simply adding:
    #target "InDesign"
    which targets the latest installed version, CC. BUT this is not a solution, just a workaround! I want to be absolutely sure I am targeting the specific version specified. Someday I may install a newer version alongside it, and then all of a sudden it will "jump" to that version when the script runs, and that's not what I want.
    Any suggestions?

    After CS6 InDesign was completely converted to 64-bit application.However for windows platform 32-bit version was still supported. Hence for Windows 32-bit and 64-bit both type of versions were part of installation.
    To distinguish between 32-bit and 64-bit version of InDesign, following targets are used.
    For Windows Use:
    #target "indesign-9.032"      //If want use 32-bit version indesign
    #target "indesign-9.064"      //If want use 64-bit version indesign
    For Mac Use:
    #target "indesign-9.064"      //As Most of the MAC machine are already 64-bit , Only 64-bit InDesign is provided for Mac.

  • Why doesn't the FloatVolume Control work?

    Hi!
    First message for me on this board, so I hope I did the things right posting here (and sorry in advance for my bad english)
    I have a problem with the Java Sound API. I'm trying to control the sample rate from a wav file to change the pitch (so sound (engine) will change when the RPM get higher) but it looks like the floatControl were not supported...
    This is the contructor from the class:
       public SampledSound(String file)
             _position = 0;
             _file = file;
             try {
                 AudioInputStream audioStream = AudioSystem.getAudioInputStream(new File("sound/"+_file));
                   DataLine.Info info = new DataLine.Info(Clip.class, audioStream.getFormat(),((int) audioStream.getFrameLength() * audioStream.getFormat().getFrameSize()));
                   _player = (Clip) AudioSystem.getLine(info);
                   _player.open(audioStream);
                   if(_player.isControlSupported(FloatControl.Type.SAMPLE_RATE))
                        FloatControl SRControl = (FloatControl) _player.getControl(FloatControl.Type.SAMPLE_RATE);
                        SRControl.setValue(SRControl.getValue()*2);
                   else
                        System.err.println("Error: FloatControl SAMPLE_RATE non support�.");
              } catch (Exception e) {
                   e.printStackTrace();
                     System.err.println("Error: Le fichier '"+_file+"' n'a pas pu �tre lu.");
              }And it's not working...
    And if I try to list the controls available for the object _player (instance of Clip) I get the following output:
      public SampledSound(String file)
             _position = 0;
             _file = file;
             try {
                 AudioInputStream audioStream = AudioSystem.getAudioInputStream(new File("sound/"+_file));
                   DataLine.Info info = new DataLine.Info(Clip.class, audioStream.getFormat(),((int) audioStream.getFrameLength() * audioStream.getFormat().getFrameSize()));
                   _player = (Clip) AudioSystem.getLine(info);
                   _player.open(audioStream);
                   for(int i=0; i<_player.getControls().length; i++)
                        System.out.println(_player.getControls().toString());
              } catch (Exception e) {
                   e.printStackTrace();
                   System.err.println("Error: Le fichier '"+_file+"' n'a pas pu �tre lu.");
    Master Gain with current value: 0.0 dB (range: -80.0 - 6.0206)
    Mute Control with current value: False
    So, does it mean that there is no FloatControl for the clip line?
    How I am supposed to do to get the control from the sample rate?
    Thanks!
    Edited by: astroB on Mar 28, 2008 7:44 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Seems to be a problem on Apples end. Probably a server overload.

  • Why won't the Tabs function work (Open new window in a new tab instead)??

    My current problem is- - I'm running FF.32, and when I click on a link (in an email, article, webpage link... anything) it opens in the Current window... it doesn't open a new* window, or new tab (as selected)... it "closes" the current page and opens the clicked-on link or email... Unless* I right-click on it and Tell it to open in a new tab instead (but I have to right-click and tell it to do this). I don't think this is normal. What do I need to change..?

    I think it is Firefox's default setting to open links in the current tab unless the site forces the link to open in a new window, or you explicitly open the link in a new tab/window.
    You may need an extension like [https://addons.mozilla.org/en-US/firefox/addon/tab-mix-plus/ Tab Mix Plus] to open links like how you want.

Maybe you are looking for

  • WebI report not refreshed after BW pwd change - SAP EP-KM asPoint of entry

    Config: BOXI3.1 SP3 FP3 INTG. KIT SP3 FP3 BW 7.01 SP5 SAP EP 6.0 Imported all transports Configured BW Publisher Configured SAP Authentication in CMC Imported required roles in CMC Imported KM Par file in Portal Issue: Users logon to EP with SAP BW c

  • Locale settings in Debian linux

    I have J2SDK 1.4.1 with NetBeans on Debian 3.0 (woody). Althoug system is set to cs_CZ (Czech) locale, Java behaves as in English environment (Locale.getDefault()...). The main problem concerns displaying and reading czech strings - neither czech dia

  • Entering budget data on different levels

    Dear experts, I have a question concerning posting budget data on different levels in BCS. In Former Budgeting there was an automatic check for budget entry which was not allowing greater amounts on lower level commitment items than on higher levels.

  • Uploading photos to website

    I am new to web development and I am designing a website for car sales. I need the users to be able to add and remove photos from the site however am not sure whether dreamweaver can just do that alone or if I need to use something else.Any pointers

  • Task Outcomes with spaces

    Hi , We have a problem when trying to generate an ADF based on Human task definition template when trying to generate the Human Task display from ,the problem is when the task contains a n outcome with space(ex. 'A B C' ) we got an error with the bin